User Tools

Site Tools


cdc:nos2.source:nam5871:xctlw

Table of Contents

XCTLW

Table Of Contents

  • [00004] PROC XCTLW(WORD,TLW)
  • [00047] PROC XTRACE

Source Code

XCTLW.txt
  1. *DECK XCTLW
  2. USETEXT NIPDEF
  3. USETEXT NP$NWNC
  4. PROC XCTLW(WORD,TLW); #COMPUTE TEXT LENGTH IN WORDS #
  5.  
  6. STARTIMS;
  7. #
  8. *1DC XCTLW
  9. *
  10. * 1. PROC NAME AUTHOR DATE
  11. * XCTLW P.C.TAM 80/02/12
  12. *
  13. * 2. FUNCTIONAL DESCRIPTION.
  14. * THIS ROUTINE COMPUTES THE TEXT LENGTH IN WORDS.
  15. *
  16. * 3. METHOD USED.
  17. * THE TEXT LENGTH IN WORDS IS COMPUTED FROM THE APPLICATION
  18. * CHARACTER TYPE AND THE TEXT LENGTH IN CHARACTERS.
  19. *
  20. * 4. ENTRY CONDITIONS.
  21. * ABHACT APPLICATION CHARACTER TYPE
  22. * ABHTLC APPLICATION TEXT LENGTH IN CHARACTERS
  23. * WORD APPLICATION BLOCK HEADER
  24. *
  25. * 5. EXIT CONDITIONS.
  26. * TLW TEXT LENGTH IN WORDS
  27. *
  28. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  29. * HEADER NIPDEF NP$NWNC
  30. *
  31. * 7. ROUTINES CALLED.
  32. * XTRACE RECORD CALL
  33. *
  34. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  35. * THIS PROCEDURE IS CALLED BY BDELINK, HPGET, HPPUT,
  36. * AND HPUTF.
  37. *
  38.  #
  39. STOPIMS;
  40. ARRAY WORD [0:0] S(1);
  41. BEGIN
  42. *CALL HEADER
  43. END
  44. ITEM TLW, TMP;
  45. XREF
  46. BEGIN
  47. PROC XTRACE;
  48. END
  49.  
  50. #**********************************************************************#
  51.  
  52. BEGIN
  53. CONTROL IFEQ DEBUG,1;
  54. XTRACE("XCTLW") ;
  55. CONTROL FI;
  56.  
  57. IF ABHABT[0] EQ APPNULL
  58. THEN # A NULL BLOCK TO BE DELIVERED TO THE APPLICATION #
  59. TLW = 0;
  60. ELSE # COMPUTE TLW FOR NON-NULL BLOCK #
  61. BEGIN
  62. TMP = ABHACT[0]; # CHARACTER TPYE OF BLOCK #
  63. TLW = (2*ABHTLC[0] + NW$ROUND[TMP])/NW$FACT[TMP];
  64. END
  65.  
  66. RETURN;
  67.  
  68. END
  69. TERM
cdc/nos2.source/nam5871/xctlw.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator