home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / pascal / shdk_1.zip / SKYHAWK.RR < prev    next >
Text File  |  1992-03-26  |  114KB  |  3,362 lines

  1. $$IndexTag = ƒ
  2.  
  3.                                 ƒUNIT ƒDEPENDENCIES
  4. .
  5.                                  D  S  S  T  T  T  T  T  T
  6.                                  O  H  H  P  P  P  P  P  P
  7.                                  S  L  U  C  D  I  M  S  W
  8.                                  |  I  T  R  O  N  E  T  I
  9.                       +--uses--> |  S  I  T  S  L  M  R  N
  10.                       |          |  T  L  |  |  I  C  I  D
  11.                       |          |  |  P  |  |  N  H  N  O
  12.                       |          |  |  K  |  |  E  K  G  W
  13.                       |          |  |  |  |  |  |  |  |  |
  14.                       ƒShƒClrDef   -  -  -  X  -  -  -  -  X
  15.                       ƒShƒCmdLin   X  X  X  -  -  -  -  -  -
  16.                       ƒShƒCmplx    -  -  -  -  -  -  -  -  -
  17.                       ƒShƒCrcChk   X  -  -  -  -  -  -  -  -
  18.                       ƒShƒDatPk    X  -  -  -  -  -  -  -  -
  19.                       ƒShƒErrMsg   -  -  -  -  -  -  -  -  -
  20.                       ƒShƒList     -  -  -  -  -  X  X  X  -
  21.                       ƒShƒLngStr   -  -  -  -  -  X  X  X  -
  22.                       ƒShƒUtilPk   -  -  -  -  X  -  -  X  -
  23.  
  24. unit ƒShƒClrDef
  25.              {Black text}                    {Blue text}
  26.              ƒBlackOnBlack       = ƒ$00;       ƒBlueOnBlack        = ƒ$01;
  27.              ƒBlackOnBlue        = ƒ$10;       ƒBlueOnBlue         = ƒ$11;
  28.              ƒBlackOnGreen       = ƒ$20;       ƒBlueOnGreen        = ƒ$21;
  29.              ƒBlackOnCyan        = ƒ$30;       ƒBlueOnCyan         = ƒ$31;
  30.              ƒBlackOnRed         = ƒ$40;       ƒBlueOnRed          = ƒ$41;
  31.              ƒBlackOnMagenta     = ƒ$50;       ƒBlueOnMagenta      = ƒ$51;
  32.              ƒBlackOnBrown       = ƒ$60;       ƒBlueOnBrown        = ƒ$61;
  33.              ƒBlackOnLtGray      = ƒ$70;       ƒBlueOnLtGray       = ƒ$71;
  34.  
  35. unit ƒShƒClrDef
  36.              {Green text}                    {Cyan text}
  37.              ƒGreenOnBlack       = ƒ$02;       ƒCyanOnBlack        = ƒ$03;
  38.              ƒGreenOnBlue        = ƒ$12;       ƒCyanOnBlue         = ƒ$13;
  39.              ƒGreenOnGreen       = ƒ$22;       ƒCyanOnGreen        = ƒ$23;
  40.              ƒGreenOnCyan        = ƒ$32;       ƒCyanOnCyan         = ƒ$33;
  41.              ƒGreenOnRed         = ƒ$42;       ƒCyanOnRed          = ƒ$43;
  42.              ƒGreenOnMagenta     = ƒ$52;       ƒCyanOnMagenta      = ƒ$53;
  43.              ƒGreenOnBrown       = ƒ$62;       ƒCyanOnBrown        = ƒ$63;
  44.              ƒGreenOnLtGray      = ƒ$72;       ƒCyanOnLtGray       = ƒ$73;
  45.  
  46. unit ƒShƒClrDef
  47.              {Red text}                      {Magenta text}
  48.              ƒRedOnBlack         = ƒ$04;       ƒMagentaOnBlack     = ƒ$05;
  49.              ƒRedOnBlue          = ƒ$14;       ƒMagentaOnBlue      = ƒ$15;
  50.              ƒRedOnGreen         = ƒ$24;       ƒMagentaOnGreen     = ƒ$25;
  51.              ƒRedOnCyan          = ƒ$34;       ƒMagentaOnCyan      = ƒ$35;
  52.              ƒRedOnRed           = ƒ$44;       ƒMagentaOnRed       = ƒ$45;
  53.              ƒRedOnMagenta       = ƒ$54;       ƒMagentaOnMagenta   = ƒ$55;
  54.              ƒRedOnBrown         = ƒ$64;       ƒMagentaOnBrown     = ƒ$65;
  55.              ƒRedOnLtGray        = ƒ$74;       ƒMagentaOnLtGray    = ƒ$75;
  56.  
  57. unit ƒShƒClrDef
  58.              {Brown text}                    {Light Gray text}
  59.              ƒBrownOnBlack       = ƒ$06;       ƒLtGrayOnBlack      = ƒ$07;
  60.              ƒBrownOnBlue        = ƒ$16;       ƒLtGrayOnBlue       = ƒ$17;
  61.              ƒBrownOnGreen       = ƒ$26;       ƒLtGrayOnGreen      = ƒ$27;
  62.              ƒBrownOnCyan        = ƒ$36;       ƒLtGrayOnCyan       = ƒ$37;
  63.              ƒBrownOnRed         = ƒ$46;       ƒLtGrayOnRed        = ƒ$47;
  64.              ƒBrownOnMagenta     = ƒ$56;       ƒLtGrayOnMagenta    = ƒ$57;
  65.              ƒBrownOnBrown       = ƒ$66;       ƒLtGrayOnBrown      = ƒ$67;
  66.              ƒBrownOnLtGray      = ƒ$76;       ƒLtGrayOnLtGray     = ƒ$77;
  67.  
  68. unit ƒShƒClrDef
  69.              {Dark Gray text}                {Light Blue text}
  70.              ƒDkGrayOnBlack      = ƒ$08;       ƒLtBlueOnBlack      = ƒ$09;
  71.              ƒDkGrayOnBlue       = ƒ$18;       ƒLtBlueOnBlue       = ƒ$19;
  72.              ƒDkGrayOnGreen      = ƒ$28;       ƒLtBlueOnGreen      = ƒ$29;
  73.              ƒDkGrayOnCyan       = ƒ$38;       ƒLtBlueOnCyan       = ƒ$39;
  74.              ƒDkGrayOnRed        = ƒ$48;       ƒLtBlueOnRed        = ƒ$49;
  75.              ƒDkGrayOnMagenta    = ƒ$58;       ƒLtBlueOnMagenta    = ƒ$59;
  76.              ƒDkGrayOnBrown      = ƒ$68;       ƒLtBlueOnBrown      = ƒ$69;
  77.              ƒDkGrayOnLtGray     = ƒ$78;       ƒLtBlueOnLtGray     = ƒ$79;
  78.  
  79. unit ƒShƒClrDef
  80.              {Light Green Text}              {Light Cyan text}
  81.              ƒLtGreenOnBlack     = ƒ$0A;       ƒLtCyanOnBlack      = ƒ$0B;
  82.              ƒLtGreenOnBlue      = ƒ$1A;       ƒLtCyanOnBlue       = ƒ$1B;
  83.              ƒLtGreenOnGreen     = ƒ$2A;       ƒLtCyanOnGreen      = ƒ$2B;
  84.              ƒLtGreenOnCyan      = ƒ$3A;       ƒLtCyanOnCyan       = ƒ$3B;
  85.              ƒLtGreenOnRed       = ƒ$4A;       ƒLtCyanOnRed        = ƒ$4B;
  86.              ƒLtGreenOnMagenta   = ƒ$5A;       ƒLtCyanOnMagenta    = ƒ$5B;
  87.              ƒLtGreenOnBrown     = ƒ$6A;       ƒLtCyanOnBrown      = ƒ$6B;
  88.              ƒLtGreenOnLtGray    = ƒ$7A;       ƒLtCyanOnLtGray     = ƒ$7B;
  89.  
  90. unit ƒShƒClrDef
  91.              {Light Red text}                {Light Magenta text}
  92.              ƒLtRedOnBlack       = ƒ$0C;       ƒLtMagentaOnBlack   = ƒ$0D;
  93.              ƒLtRedOnBlue        = ƒ$1C;       ƒLtMagentaOnBlue    = ƒ$1D;
  94.              ƒLtRedOnGreen       = ƒ$2C;       ƒLtMagentaOnGreen   = ƒ$2D;
  95.              ƒLtRedOnCyan        = ƒ$3C;       ƒLtMagentaOnCyan    = ƒ$3D;
  96.              ƒLtRedOnRed         = ƒ$4C;       ƒLtMagentaOnRed     = ƒ$4D;
  97.              ƒLtRedOnMagenta     = ƒ$5C;       ƒLtMagentaOnMagenta = ƒ$5D;
  98.              ƒLtRedOnBrown       = ƒ$6C;       ƒLtMagentaOnBrown   = ƒ$6D;
  99.              ƒLtRedOnLtGray      = ƒ$7C;       ƒLtMagentaOnLtGray  = ƒ$7D;
  100.  
  101. unit ƒShƒClrDef
  102.              {Yellow text}                   {White text}
  103.              ƒYellowOnBlack      = ƒ$0E;       ƒWhiteOnBlack       = ƒ$0F;
  104.              ƒYellowOnBlue       = ƒ$1E;       ƒWhiteOnBlue        = ƒ$1F;
  105.              ƒYellowOnGreen      = ƒ$2E;       ƒWhiteOnGreen       = ƒ$2F;
  106.              ƒYellowOnCyan       = ƒ$3E;       ƒWhiteOnCyan        = ƒ$3F;
  107.              ƒYellowOnRed        = ƒ$4E;       ƒWhiteOnRed         = ƒ$4F;
  108.              ƒYellowOnMagenta    = ƒ$5E;       ƒWhiteOnMagenta     = ƒ$5F;
  109.              ƒYellowOnBrown      = ƒ$6E;       ƒWhiteOnBrown       = ƒ$6F;
  110.              ƒYellowOnLtGray     = ƒ$7E;       ƒWhiteOnLtGray      = ƒ$7F;
  111.  
  112. unit ƒShƒClrDef
  113.              ƒOrientation = (ƒVertical, ƒHorizontal);
  114.  
  115. unit ƒShƒClrDef
  116.         ƒSELECTCOLORS
  117.         Declarations:
  118.              function SelectColors(Row, Col, BegAttr : byte;
  119.                               CpFrameChars      : FrameArray;
  120.                               Orient            : Orientation;
  121.                               ErasePanelOnExit,
  122.                               EraseCursorOnExit,
  123.                               WrapCursor        : boolean;
  124.                               Header  : string) : byte;
  125. .
  126.  
  127.         Purpose:
  128.              Displays a color selection panel, permitting the user to
  129.         move a special cursor using the arrow keys and select a desired
  130.         color combination using the <CR> key.
  131. .
  132.         Comments:
  133.              The user navigates the panel with the arrow keys and selects
  134.         the desired color combination by pressing <CR>. The attribute
  135.         byte value currently under the cursor will be returned. The user
  136.         can also press <INS>, which will return a function value of $FF,
  137.         and by convention, should be taken to indicate that the currently
  138.         selected attribute value is to be unchanged. Additionally, the
  139.         user can press <ESC>, returning a function value of $FE, which by
  140.         convention should be taken to indicate that the current color
  141.         selection run is completed. Finally, a return of $FD indicates
  142.         that the user has pressed the <F1> key either alone or in
  143.         combination with one of the shift-type keys (<L-SHIFT>, <R-
  144.         SHIFT>, <CTRL>, or <ALT>), and by convention indicates that the
  145.         user is requesting help.
  146. .
  147.              The function performs the following actions:
  148. .
  149.             *  Displays a 16x8 panel of text colors with the window
  150.                coordinates of the upper left corner at coordinates X=Col,
  151.                Y=Row.
  152. .
  153.             *  The attribute at which the cursor will be initially placed
  154.                is at BegAttr.
  155. .
  156.             *  The color panel will be framed using the characters
  157.                specified in CpFrameChars.
  158. .
  159.             *  The orientation of the long dimension of the selection
  160.                panel is determined as specified by Orient.
  161. .
  162.             *  ErasePanelOnExit determines whether the panel is erased or
  163.                preserved on the screen when SelectColors returns to the
  164.                caller. The panel is always disposed, and its heap space
  165.                reclaimed.
  166. .
  167.             *  EraseCursorOnExit is only effective if ErasePanelOnExit is
  168.                false. If the panel is to be preserved between calls to
  169.                SelectColors, EraseCursor determines whether the or not
  170.                the cursor will continue to be displayed along with the
  171.                panel.
  172. .
  173.             *  WrapCursor determines whether the cursor will wrap both
  174.                horizontally and vertically. True allows the cursor to
  175.                wrap; False inhibits further cursor movement when a window
  176.                edge is reached.
  177. .
  178.             *  Header is the header line which will be displayed on the
  179.                panel. It can be supplied as an empty string (''), in
  180.                which case no header will be displayed.
  181. .
  182.             *  The function returns a normal text attribute byte, with
  183.                the following exceptions:
  184. .
  185.                Return         Explanation
  186.                ------         -----------
  187.                $FF            <INS> was pressed by the user. Leave the
  188.                              current value unchanged.
  189.                $FE            <ESC> was pressed by the user. Accept all
  190.                              current values and consider the run
  191.                              completed.
  192.                $FD            <F1> was pressed by the user. Provide a
  193.                              HELP screen or message.
  194.                $F0            Error in MakeWindow
  195.                $F1            Error in DisplayWindow
  196.  
  197. unit ƒShƒClrDef
  198.         ƒCOLORNAME
  199.         Declarations:
  200.              function ColorName(Attr  : byte) : string;
  201. .
  202.         Purpose:
  203.              Given a text attribute byte, ColorName returns the attribute
  204.         color name as defined above; e.g., ColorName($1E) will return
  205.         'YellowOnBlue'.
  206. .
  207.         Comments:
  208.              If a byte value is passed which does not correspond to a
  209.         valid text attribute, an empty string is returned.
  210. .
  211.         Examples:
  212.         The statement
  213. .
  214.                              WriteLn(ColorName($73));
  215. .
  216.         displays the string
  217. .
  218.                                    CyanOnLtGray
  219. .
  220.         on the screen.
  221.  
  222. unit ƒShƒCmdLin
  223.              ValueType = (VtStr, VtReal, VtInt);
  224.              SwRec     = record
  225.                            Name  : string;
  226.                            case SwVal  : ValueType of
  227.                              VtStr : (StrVal : string);
  228.                              VtReal: (RealVal: Extended);
  229.                              VtInt : (IntVal : integer);
  230.                            end; {SwRec}
  231.              CharSet = Set of Char;
  232.  
  233. unit ƒShƒCmdLin
  234.         ƒCLCLOSE
  235.         Declarations:
  236.              procedure ClClose;
  237. .
  238.         Purpose:
  239.              Closes the internal data structures and frees the space
  240.         associated with the command line switch list.
  241. .
  242.         Comments:
  243.              If GetSwitch is used to retrieve switch values, ClClose
  244.         should be called following retrieval of the last switch. If
  245.         PopSwitch is used, ClClose need not be called.
  246. .
  247.         Examples:
  248.              See the files TESTCL.PAS and CLTEST.BAT
  249. .
  250.         See also:
  251.              ClInit    GetSwitch      PopSwitch
  252.  
  253. unit ƒShƒCmdLin
  254.         ƒCLINIT
  255.         Declarations:
  256.              procedure ClInit;
  257. .
  258.         Purpose:
  259.              Initializes the internal data structures used to store the
  260.         command line switch list.
  261. .
  262.         Comments:
  263.              ClInit MUST be called prior to any of the other Cl routines.
  264. .
  265.         Examples:
  266.              See the files TESTCL.PAS and CLTEST.BAT
  267. .
  268.         See also:
  269.              ClClose
  270.  
  271. unit ƒShƒCmdLin
  272.         ƒCLPARSE
  273.         Declarations:
  274.              procedure ClParse(StrPtr : Pointer; StrOnly : Boolean;
  275.                       LeadIn, ValDelim : CharSet; var Err : Integer);
  276. .
  277.         Purpose:
  278.              To parse a command tail (or other string of similar form),
  279.         producing a list of switch names and associated values which can
  280.         then be retrieved using the GetSwitch or PopSwitch functions.
  281. .
  282.         Comments:
  283.              Parsing is accomplished by invoking the procedure ClParse
  284.         with five parameters:
  285. .
  286.            1.  StrPtr of type Pointer is used to point to the string to
  287.                be parsed. If StrPtr is NIL, the command tail will be
  288.                parsed.
  289. .
  290.            2.  StrOnly of type Boolean is used to determine if switch
  291.                values of type String are to be forced, regardless of the
  292.                form of the value. StrOnly = True forces String values.
  293. .
  294.            3.  LeadIn of type CharSet is used to identify the set of
  295.                characters used to mark the beginning of a switch. It is
  296.                suggested that LeadIn be set to [ ReadSwCh ]. The weakest
  297.                condition used should be that the expression ( ReadSwCh in
  298.                LeadIn ) be TRUE.
  299. .
  300.            4.  ValDelim of type CharSet is used to specify the set of
  301.                characters which may be used to separate the switch name
  302.                from the switch value.
  303. .
  304.            5.  Err of type Integer is used to return error conditions.
  305. .
  306.              Prior to the call to ClParse, a call MUST be made to ClInit.
  307. .
  308.              The procedure prepares a list of records, each record con-
  309.         taining the name and value of one command line switch. These
  310.         records will require 536 bytes of heap space per switch.
  311. .
  312.              All switches (with the optional exception of the first) are
  313.         preceded by one of the members of the set LeadIn.
  314. .
  315.              Switches may take values of type Real (actually, Extended),
  316.         LongInt, or String. In each case, the switch value is separated
  317.         from the switch name by one of the characters specified in the
  318.         parameter ValDelim. Switches which do not take on any explicit
  319.         value will be returned as type String, with a value length of
  320.         zero.
  321. .
  322.              Assuming StrOnly = FALSE in the call, switches whose VALUE
  323.         is intended to be of type String, but with a FORM qualifying as a
  324.         numeric, must be enclosed in either single or double quotation
  325.         marks. Otherwise, the value will be returned as a Real or
  326.         LongInt, as determined by its specific syntax.
  327. .
  328.              Additionally, any blanks included in String values will be
  329.         packed out unless the value is included in quotation marks.
  330.         Further, if single quote marks are to be included as part of a
  331.         string value, then double quotes must be used to define the
  332.         value; and vice versa.
  333. .
  334.              Finally, blanks may be freely entered in the command tail to
  335.         improve readability (except as noted above).
  336. .
  337.         Error Returns:
  338.              The error parameter returns one of three values:
  339.                   0 --> No error encountered.
  340.                   1 --> Unbalanced single quotes encountered.
  341.                   2 --> Unbalanced double quotes encountered.
  342.                   3 --> Insufficient heap space to store the switch list.
  343. .
  344.              Assuming the error return is 0, the list of switches has
  345.         been successfully prepared and is available for retrieval using
  346.         GetSwitch or PopSwitch.
  347. .
  348.              If GetSwitch has been used to retrieve the switch values,
  349.         ClClose should be called to release the heap space associated
  350.         with the list of switches. This is not necessary if PopSwitch has
  351.         been used for retrieval (but it won't hurt anything, either).
  352. .
  353.         Examples:
  354.              See the files TESTCL.PAS and CLTEST.BAT
  355. .
  356.         See also:
  357.              ClInit    ClClose   GetSwitch      PopSwitch
  358.  
  359. unit ƒShƒCmdLin
  360.         ƒGETSWITCH
  361.         Declarations:
  362.              function GetSwitch(var Y : SwRec) : boolean;
  363. .
  364.         Purpose:
  365.              Retrieves the next switch record in the list of switch
  366.         records prepared by ClParse. Returns FALSE if no more.
  367. .
  368.         Comments:
  369.              The list of switches can, if desired, be treated as a ring
  370.         (thus enabling switches to be read more than once). If GetSwitch
  371.         is called again after returning a function value of FALSE, read-
  372.         ing will recommence at the top of the list.
  373. .
  374.              Use of GetSwitch and PopSwitch should not be combined. If
  375.         they are both used on the same pass through the command tail,
  376.         orphan blocks (blocks which have no associated pointer, and thus
  377.         cannot be accessed or retrieved) will result on the heap.
  378. .
  379.         Examples:
  380.              See the files TESTCL.PAS and CLTEST.BAT
  381. .
  382.         See also:
  383.              PopSwitch
  384.  
  385. unit ƒShƒCmdLin
  386.         ƒPOPSWITCH
  387.         Declarations:
  388.              function PopSwitch(var Y : SwRec) : boolean;
  389. .
  390.         Purpose:
  391.              Retrieves the next switch record in the list of switch
  392.         records prepared by ClParse, and frees its heap space. Returns
  393.         FALSE if no more.
  394. .
  395.         Comments:
  396.              Since PopSwitch frees the heap space associated with each
  397.         switch after it has been returned to the caller, it is not
  398.         necessary to call ClClose after reaching the end of the switch
  399.         list. For the same reason, however, the switch list cannot be
  400.         treated as a ring (that is, the switch list cannot be reread
  401.         after the end has been reached).
  402. .
  403.              Use of GetSwitch and PopSwitch should not be combined. If
  404.         they are both used on the same pass through the command tail,
  405.         orphan blocks (blocks which have no associated pointer, and thus
  406.         cannot be accessed or retrieved) will result on the heap.
  407. .
  408.         Examples:
  409.              See the files TESTCL.PAS and CLTEST.BAT
  410. .
  411.         See also:
  412.              GetSwitch
  413.  
  414. unit ƒShƒCmdLin
  415.         ƒREADSWCH
  416.         Declarations:
  417.              function ReadSwCh : char;
  418. .
  419.         Purpose:
  420.              Returns the current switch lead-in character.
  421. .
  422.         Comments:
  423.              DOS normally recognizes the character '/' as the switch
  424.         lead-in. DOS also permits this character to be changed. In par-
  425.         ticular, some installations whose personnel are more comfortable
  426.         in a UNIX-like environment have changed the switch lead-in to
  427.         '-'. The ReadSwCh function permits the programmer to assure that
  428.         the character which DOS recognizes will be included in the set of
  429.         permissible lead-in characters which the parser will also
  430.         recognize.
  431. .
  432.         Examples:
  433.              See the files TESTCL.PAS and CLTEST.BAT
  434. .
  435.         See also:
  436.              SetSwCh
  437.  
  438. unit ƒShƒCmdLin
  439.         ƒSETSWCH
  440.         Declarations:
  441.              procedure SetSwCh(C : char);
  442. .
  443.         Purpose:
  444.              Sets the switch lead-in character to C.
  445. .
  446.         Comments:
  447.              THIS PROCEDURE MODIFIES THE CURRENTLY RUNNING COPY OF DOS.
  448.         Therefore it should only be used in exceptional circumstances,
  449.         and with great caution. Otherwise the users could be in for quite
  450.         a surprise! It is included here primarily for completeness.
  451. .
  452.         Examples:
  453.                                   SetSwCh('+');
  454. .
  455.         will change the switch lead-in to '+'.
  456. .
  457.         See also:
  458.              ReadSwCh
  459.  
  460. unit ƒShƒCmplx
  461.              ComplexElement  = extended;
  462.              ComplexBaseType = record
  463.                                  Re,
  464.                                  Im  : ComplexElement;
  465.                                  end;
  466.              Complex         = ^ComplexBaseType;
  467.  
  468. unit ƒShƒCmplx
  469.         ƒC2P
  470.         Declarations:
  471.              procedure C2P(A : Complex; var Result : Complex);
  472.              function C2PF(A : Complex) : Complex;
  473. .
  474.         Purpose:
  475.              Transforms a complex in Cartesian form into polar form.
  476. .
  477.         Examples:
  478.              CpPwrR(C2PF(MyCmpx), 3.0, MyCmpxCubedPolar);
  479. .
  480.         Comments:
  481.              The magnitude will be stored in Result^.Re and the angle
  482.         (expressed in radians) in Result^.Im
  483. .
  484.         See Also:
  485.              P2C
  486.  
  487. unit ƒShƒCmplx
  488.         ƒCABS
  489.         Declarations:
  490.              procedure CAbs(A  : Complex; var Result : ComplexElement);
  491.              function CAbsF(A  : Complex)  : ComplexElement;
  492. .
  493.         Purpose:
  494.              Returns the absolute value of a complex number.
  495. .
  496.         Examples:
  497.              ∙∙∙
  498.              MyCmpx^.Re := 3.0;
  499.              MyCmpx^.Im := 4.0;
  500.              ∙∙∙
  501.              WriteLn(CAbs(MyCmpx):4:1);    {will display 5.0}
  502. .
  503.         Comments:
  504.              Recall that the absolute value of a complex number Re + iIm
  505.         is sqrt((Re * Re) + (Im * Im)).
  506. .
  507.         See Also:
  508.  
  509. unit ƒShƒCmplx
  510.         ƒCADD
  511.         Declarations:
  512.              procedure CAdd(A, B : Complex; var Result : Complex);
  513.              function CAddF(A, B : Complex) : Complex;
  514. .
  515.         Purpose:
  516.              Returns the sum of two complex numbers A + B.
  517. .
  518.         Examples:
  519.              See the file TESTCMPX.PAS
  520. .
  521.         Comments:
  522. .
  523.         See Also:
  524.              CSub      CMul      CDiv
  525.  
  526. unit ƒShƒCmplx
  527.         ƒCCONJ
  528.         Declarations:
  529.              procedure CConj(A : Complex; var Result : Complex);
  530.              function CConjF(A : Complex) : Complex;
  531. .
  532.         Purpose:
  533.              Returns the complex conjugate of a complex number.
  534. .
  535.         Examples:
  536.              See the file TESTCMPX.PAS
  537. .
  538.         Comments:
  539.              Recall that if a complex number A = R + Ii, then the complex
  540.         conjugate of A is R - Ii.
  541. .
  542.         See Also:
  543.  
  544. unit ƒShƒCmplx
  545.         ƒCDIV
  546.         Declarations:
  547.              procedure CDiv(A, B : Complex; var Result : Complex);
  548.              function CDivF(A, B : Complex) : Complex;
  549. .
  550.         Purpose:
  551.              Returns the quotient of two complex numbers A / B.
  552. .
  553.         Examples:
  554.              See the file TESTCMPX.PAS
  555. .
  556.         Comments:
  557.              CAbsF(B) must be > 0.0. If CAbsF(B) <= 0.0, CmplxError will
  558.         return -1.
  559. .
  560.         See Also:
  561.              CAdd      CMul      CSub
  562.  
  563. unit ƒShƒCmplx
  564.         ƒCMP2STR
  565.         Declarations:
  566.              function Cmp2Str(A : Complex; Width, Places : byte) :
  567.                                                                string;
  568. .
  569.         Purpose:
  570.              Converts a complex value to a string of the form
  571.                                    (Re + Im i)
  572. .
  573.         Examples:
  574.              See the file TESTCMPX.PAS
  575. .
  576.         Comments:
  577.              The Width and Places arguments have the same significance
  578.         that they do in the system procedure STR, and are applied
  579.         individually to both the REAL and IMAGINARY parts.
  580. .
  581.         See Also:
  582.              CmpP2Str       CmpP2StrD
  583.  
  584. unit ƒShƒCmplx
  585.         ƒCMPLXERROR
  586.         Declarations:
  587.              function CmplxError  : integer;
  588. .
  589.         Purpose:
  590.              Returns execution error conditions for the package.
  591. .
  592.         Examples:
  593.              See the file TESTCMPX.PAS
  594. .
  595.         Comments:
  596.              Return = 0     OK
  597.                       -1    Attempt to divide by zero (CDiv)
  598.                       -2    Magnitude of complex is zero (CpPwrR)
  599. .
  600.         See Also:
  601.  
  602. unit ƒShƒCmplx
  603.         ƒCMPP2STR
  604.         Declarations:
  605.              function CmpP2Str(A : Complex; Width, Places : byte) :
  606.                                                                string;
  607. .
  608.         Purpose:
  609.              Converts a complex in polar form to a string with the angle
  610.         expressed in radians.
  611. .
  612.         Examples:
  613.              See the file TESTCMPX.PAS
  614. .
  615.         Comments:
  616.              The Width and Places arguments have the same significance
  617.         that they do in the system procedure STR, and are applied
  618.         individually to both the MAGNITUDE and ANGLE parts.
  619. .
  620.         See Also:
  621.              Cmp2Str        CmpP2StrD
  622.  
  623. unit ƒShƒCmplx
  624.         ƒCMPP2STRD
  625.         Declarations:
  626.              function CmpP2StrD(A : Complex; Width, Places : byte) :
  627.                                                                string;
  628. .
  629.         Purpose:
  630.              Converts a complex in polar form to a string with the angle
  631.         in degrees.
  632. .
  633.         Examples:
  634.              See the file TESTCMPX.PAS
  635. .
  636.         Comments:
  637.              The Width and Places arguments have the same significance
  638.         that they do in the system procedure STR, and are applied
  639.         individually to both the MAGNITUDE and ANGLE parts.
  640. .
  641.         See Also:
  642.              Cmp2Str        CmpP2Str
  643.  
  644. unit ƒShƒCmplx
  645.         ƒCMUL
  646.         Declarations:
  647.              procedure CMul(A, B : Complex; var Result : Complex);
  648.              function CMulF(A, B : Complex) : Complex;
  649. .
  650.         Purpose:
  651.              Returns the product of two complex numbers A * B.
  652. .
  653.         Examples:
  654.              See the file TESTCMPX.PAS
  655. .
  656.         Comments:
  657. .
  658.         See Also:
  659.              CAdd      CDiv      CSub      RxC
  660.  
  661. unit ƒShƒCmplx
  662.         ƒCPPWRR
  663.         Declarations:
  664.              procedure CpPwrR(A : Complex; R : ComplexElement;
  665.                                                 var Result : Complex);
  666.              function CpPwrRF(A : Complex; R : ComplexElement) : Complex;
  667. .
  668.         Purpose:
  669.              Raises a complex (in polar form) to a real power.
  670. .
  671.         Examples:
  672.              See the file TESTCMPX.PAS
  673. .
  674.         Comments:
  675.              If A^.Re = 0, CmplxError will return -2, and
  676.                            Result will be 0 + 0i
  677.                            n.b. A^.Re contains the magnitude.
  678. .
  679.         See Also:
  680.  
  681. unit ƒShƒCmplx
  682.         ƒCSUB
  683.         Declarations:
  684.              procedure CSub(A, B : Complex; var Result : Complex);
  685.              function CSubF(A, B : Complex) : Complex;
  686. .
  687.         Purpose:
  688.              Returns the difference between two complex numbers A - B.
  689. .
  690.         Examples:
  691.              See the file TESTCMPX.PAS
  692. .
  693.         Comments:
  694. .
  695.         See Also:
  696.              CAdd      CDiv      CMul
  697.  
  698. unit ƒShƒCmplx
  699.         ƒP2C
  700.         Declarations:
  701.              procedure P2C(A : Complex; var Result : Complex);
  702.              function P2CF(A : Complex) : Complex;
  703. .
  704.         Purpose:
  705.              Transforms a complex in polar form into Cartesian form. The
  706.         magnitude is stored in A^.Re and the angle (expressed in radians)
  707.         in A^.Im.
  708. .
  709.         Examples:
  710.              See the file TESTCMPX.PAS
  711. .
  712.         Comments:
  713. .
  714.         See Also:
  715.              C2P
  716.  
  717. unit ƒShƒCmplx
  718.         ƒRXC
  719.         Declarations:
  720.              procedure RxC(A : ComplexElement; B : Complex;
  721.                                                 var Result : Complex);
  722.              function RxCF(A : ComplexElement; B : Complex) : Complex;
  723. .
  724.         Purpose:
  725.              Returns the complex product of a real and a complex.
  726. .
  727.         Examples:
  728.              See the file TESTCMPX.PAS
  729. .
  730.         Comments:
  731.              This is simply a special case of CMul, in which the
  732.         imaginary part of one of the factors is zero. It occurrs with
  733.         sufficient frequency, however, to warrent separate treatment.
  734. .
  735.         See Also:
  736.              CMul
  737.  
  738. unit ƒShƒCrcChk
  739.         ƒCRCCALC
  740.         Declarations:
  741.              function CrcCalc(FileName : String) : word;
  742. .
  743.         Purpose:
  744.               To calculate the CRC16 of a named file, assumed to exist.
  745. .
  746.         Examples:
  747.               if CrcCalc(MyFile) <> CrcShouldBe then begin
  748.                 (*Take remedial action*)
  749.                 end;
  750. .
  751.         Comments:
  752.               MyFile is a file of any type, and may have any attributes
  753.         including Hidden, ReadOnly, etc. A run time error will result,
  754.         however, if the file does not exist.
  755.  
  756. unit ƒShƒCrcChk
  757.         ƒCRCCOPY
  758.         Declarations:
  759.              function CrcCopy(InFileName, OutFileName : String) : word;
  760. .
  761.         Purpose:
  762.               Calculates the CRC16 value for file=InFileName, while
  763.         copying it to file=OutFileName.
  764. .
  765.         Examples:
  766.               CrcShouldBe := CrcCopy(FileFromYou, MyFile);
  767.               if CrcCopy(MyFile, '') <> CrcShouldBe then begin
  768.                 (*Take remedial action*)
  769.                 end;
  770. .
  771.         Comments:
  772.               The output file name is optional. If OutFileName is speci-
  773.         fied, InFileName is copied to OutFileName. If OutFileName is an
  774.         empty string, CrcCopy behaves exactly like CrcCalc. In either
  775.         case, the CRC16 value of InFileName is returned.
  776. .
  777.               Using CrcCopy simply to calculate the CRC16 of the input
  778.         file will be marginally slower than using CrcCalc. In cases in
  779.         which both functionalities are required, however, using CrcCopy
  780.         exclusively will result in a somewhat smaller code segment.
  781.  
  782. unit ƒShƒDatPk
  783.              GregType  = record
  784.                            Year  : LongInt;
  785.                            Month,
  786.                            Day   : byte;
  787.                            end;
  788.              Variables of this type contain a complete Gregorian date,
  789.         and are passed to many of the routines in this unit.
  790. .
  791.              TimeType  = record
  792.                            H,
  793.                            M,
  794.                            S   : byte;
  795.                            end;
  796.              Variables of this type contain a complete time record, and
  797.         are passed to many of the routines in this unit.
  798.  
  799. unit ƒShƒDatPk
  800.              DayStr  : array[0..6] of string[9] =
  801.                            ('Sunday'   , 'Monday'   , 'Tuesday'  ,
  802.                             'Wednesday', 'Thursday' , 'Friday'   ,
  803.                             'Saturday' );
  804.  
  805. unit ƒShƒDatPk
  806.              MonthStr: array[1..12] of string[9] =
  807.                            ('January'  , 'February' , 'March',
  808.                             'April'    , 'May'      , 'June',
  809.                             'July'     , 'August'   , 'September',
  810.                             'October'  , 'November' , 'December');
  811.  
  812. unit ƒShƒDatPk
  813.         ƒDOW
  814.         Declarations:
  815.              function DoW(Greg : GregType) : byte;
  816. .
  817.         Purpose:
  818.              To compute the day of the week (Sunday = 0; Saturday = 6)
  819.         from the Gregorian date.
  820. .
  821.         Examples:
  822.              See TESTDATE.PAS
  823. .
  824.         Comments:
  825. .
  826.         See also:
  827.  
  828. unit ƒShƒDatPk
  829.         ƒGREG2ANSI
  830.         Declarations:
  831.              function Greg2ANSI(G : GregType) : string;
  832. .
  833.         Purpose:
  834.              Given a Gregorian date, return the date as an ANSI date
  835.         string (YYYYMMDD).
  836. .
  837.         Examples:
  838.              See TESTDATE.PAS
  839. .
  840.         Comments:
  841.              Note that the ANSI date format is both sortable and
  842.         readable.
  843. .
  844.         See also:
  845.              JDN2ANSI
  846.  
  847. unit ƒShƒDatPk
  848.         ƒGREG2JDATE
  849.         Declarations:
  850.              function Greg2JDate(Greg : GregType) : integer;
  851. .
  852.         Purpose:
  853.              To compute the Julian date from the Gregorian date.
  854. .
  855.         Examples:
  856.              See TESTDATE.PAS
  857. .
  858.         Comments:
  859.              Do not confuse the Julian date with the Julian Day-Number.
  860.         The Julian date, most commonly used in business applications, is
  861.         the serial index of a date WITHIN A GIVEN YEAR. The Julian Day-
  862.         Number is the serial index of a date from January 1, 4713 B.C.
  863. .
  864.         See also:
  865.              JDate2Greg
  866.  
  867. unit ƒShƒDatPk
  868.         ƒGREG2JDN
  869.         Declarations:
  870.              function Greg2JDN(Greg : GregType) : LongInt;
  871. .
  872.         Purpose:
  873.              To convert a Gregorian date into a Julian Day-Number.
  874. .
  875.         Examples:
  876.              See TESTDATE.PAS
  877. .
  878.         Comments:
  879.              The Julian Day-Number (JDN) is the basic form for date
  880.         manipulation within this unit. Thus this function performs the
  881.         primary conversion between dates in the customary form and
  882.         equivalent dates suitable for manipulation by ShDatPk.
  883. .
  884.         See also:
  885.              JDN2Greg
  886.  
  887. unit ƒShƒDatPk
  888.         ƒJDATE2GREG
  889.         Declarations:
  890.              procedure JDate2Greg(JDate, Year : Integer;
  891.                                                     var Greg : GregType);
  892. .
  893.         Purpose:
  894.              To compute the Gregorian date from the Julian date.
  895. .
  896.         Examples:
  897.              See TESTDATE.PAS
  898. .
  899.         Comments:
  900.              Do not confuse the Julian date with the Julian Day-Number.
  901.         The Julian date, most commonly used in business applications, is
  902.         the serial index of a date WITHIN A GIVEN YEAR. The Julian Day-
  903.         Number is the serial index of a date from January 1, 4713 B.C.
  904. .
  905.         See also:
  906.              Greg2JDate
  907.  
  908. unit ƒShƒDatPk
  909.         ƒJDN2ANSI
  910.         Declarations:
  911.              function JDN2ANSI(JDN : LongInt) : string;
  912. .
  913.         Purpose:
  914.              Given a Julian Day-Number, return the JDN as an ANSI date
  915.         string (YYYYMMDD).
  916. .
  917.         Examples:
  918.              See TESTDATE.PAS
  919. .
  920.         Comments:
  921.              Note that the ANSI date format is both sortable and
  922.         readable.
  923. .
  924.         See also:
  925.              Greg2ANSI
  926.  
  927. unit ƒShƒDatPk
  928.         ƒJDN2GREG
  929.         Declarations:
  930.              procedure JDN2Greg(JDN : LongInt; var Greg : GregType);
  931. .
  932.         Purpose:
  933.              To compute the Gregorian date from the Julian Day-Number.
  934. .
  935.         Examples:
  936.              See TESTDATE.PAS
  937. .
  938.         Comments:
  939.              The Julian Day-Number (JDN) is the basic form for date
  940.         manipulation within this unit. Thus this function performs the
  941.         primary conversion between dates in ShDatPk internal form and
  942.         equivalent dates in the customary form.
  943. .
  944.         See also:
  945.              Greg2JDN
  946.  
  947. unit ƒShƒDatPk
  948.         ƒGREG2STR
  949.         Declarations:
  950.              function Greg2Str(G : GregType; Delim : string) : string;
  951. .
  952.         Purpose:
  953.              Returns a Gregorian date record as a string of the form
  954.         MMdDDdYYYY, where the separator, "d", is Delim[1].
  955. .
  956.         Examples:
  957.              See TESTDATE.PAS
  958. .
  959.         Comments:
  960. .
  961.         See also:
  962.  
  963. unit ƒShƒDatPk
  964.         ƒJDN2STR
  965.         Declarations:
  966.              function JDN2Str(JDN : LongInt; Delim : string) : string;
  967. .
  968.         Purpose:
  969.              Returns a Julian Day-Number as a string of the form
  970.         MMdDDdYYYY, where the separator, "d", is Delim[1].
  971. .
  972.         Examples:
  973.              See TESTDATE.PAS
  974. .
  975.         Comments:
  976. .
  977.         See also:
  978.  
  979. unit ƒShƒDatPk
  980.         ƒNOW
  981.         Declarations:
  982.              function Now  : LongInt;
  983. .
  984.         Purpose:
  985.              Returns the system time as Seconds-Since-Midnight.
  986. .
  987.         Examples:
  988.              See TESTDATE.PAS
  989. .
  990.         Comments:
  991. .
  992.         See also:
  993.  
  994. unit ƒShƒDatPk
  995.         ƒNOW2TIME
  996.         Declarations:
  997.              procedure Now2Time(var T : TimeType);
  998. .
  999.         Purpose:
  1000.              Returns the system time as a Time record.
  1001. .
  1002.         Examples:
  1003.              See TESTDATE.PAS
  1004. .
  1005.         Comments:
  1006. .
  1007.         See also:
  1008.  
  1009. unit ƒShƒDatPk
  1010.         ƒNOWSTR
  1011.         Declarations:
  1012.              function NowStr(Delim : string; T24 : boolean) : string;
  1013. .
  1014.         Purpose:
  1015.              Returns the system time as a string of the form:
  1016. .
  1017.              HHdMMdSSss     if Delim is non-empty and T24 (24 hour time)
  1018.                            is false. The delimiter used, "d", is
  1019.                            Delim[1]. The suffix, "ss", is "am" or "pm" as
  1020.                            appropriate.
  1021.              HHdMMdSS       if Delim is non-empty and T24 (24 hour time)
  1022.                            is true. The delimiter used, "d", is Delim[1].
  1023.                            The time will be expressed in 24-hour form.
  1024.              HHMMSSss       if Delim is empty and T24 (24 hour time) is
  1025.                            false. The suffix, "ss", is "am" or "pm" as
  1026.                            appropriate.
  1027.              HHMM           if Delim is empty and T24 (24 hour time) is
  1028.                            true. The time will be expressed in 24-hour
  1029.                            form.
  1030. .
  1031.         Examples:
  1032.              See TESTDATE.PAS
  1033. .
  1034.         Comments:
  1035. .
  1036.         See also:
  1037.  
  1038. unit ƒShƒDatPk
  1039.         ƒSSM2TIME
  1040.         Declarations:
  1041.              procedure SSM2Time(SSM : LongInt; var T : TimeType);
  1042. .
  1043.         Purpose:
  1044.              Converts Seconds-Since-Midnight to a Time record.
  1045. .
  1046.         Examples:
  1047.              See TESTDATE.PAS
  1048. .
  1049.         Comments:
  1050. .
  1051.         See also:
  1052.  
  1053. unit ƒShƒDatPk
  1054.         ƒSSM2TIMESTR
  1055.         Declarations:
  1056.              function SSM2TimeStr(SSM : LongInt; Delim : string;
  1057.                                                  T24 : boolean) : string;
  1058. .
  1059.         Purpose:
  1060.              Converts Seconds-Since-Midnight to a time string, of the
  1061.         form:
  1062. .
  1063.              HHdMMdSSss     if Delim is non-empty and T24 (24 hour time)
  1064.                            is false. The delimiter used, "d", is
  1065.                            Delim[1]. The suffix, "ss", is "am" or "pm" as
  1066.                            appropriate.
  1067.              HHdMMdSS       if Delim is non-empty and T24 (24 hour time)
  1068.                            is true. The delimiter used, "d", is Delim[1].
  1069.                            The time will be expressed in 24-hour form.
  1070.              HHMMSSss       if Delim is empty and T24 (24 hour time) is
  1071.                            false. The suffix, "ss", is "am" or "pm" as
  1072.                            appropriate.
  1073.              HHMM           if Delim is empty and T24 (24 hour time) is
  1074.                            true. The time will be expressed in 24-hour
  1075.                            form.
  1076. .
  1077.         Examples:
  1078.              See TESTDATE.PAS
  1079. .
  1080.         Comments:
  1081. .
  1082.         See also:
  1083.  
  1084. unit ƒShƒDatPk
  1085.         TIME2SSM
  1086.         Declaration
  1087.              function Time2SSM(T : TimeType) : LongInt;
  1088. .
  1089.         Purpose:
  1090.              Converts a Time record to Seconds-Since-Midnight.
  1091. .
  1092.         Examples:
  1093.              See TESTDATE.PAS
  1094. .
  1095.         Comments:
  1096. .
  1097.         See also:
  1098.  
  1099. unit ƒShƒDatPk
  1100.         ƒTIME2TIMESTR
  1101.         Declarations:
  1102.              function Time2TimeStr(T : TimeType; Delim : string;
  1103.                                                  T24 : boolean) : string;
  1104. .
  1105.         Purpose:
  1106.              Converts a time record to a time string of the form:
  1107. .
  1108.              HHdMMdSSss     if Delim is non-empty and T24 (24 hour time)
  1109.                            is false. The delimiter used, "d", is
  1110.                            Delim[1]. The suffix, "ss", is "am" or "pm" as
  1111.                            appropriate.
  1112.              HHdMMdSS       if Delim is non-empty and T24 (24 hour time)
  1113.                            is true. The delimiter used, "d", is Delim[1].
  1114.                            The time will be expressed in 24-hour form.
  1115.              HHMMSSss       if Delim is empty and T24 (24 hour time) is
  1116.                            false. The suffix, "ss", is "am" or "pm" as
  1117.                            appropriate.
  1118.              HHMM           if Delim is empty and T24 (24 hour time) is
  1119.                            true. The time will be expressed in 24-hour
  1120.                            form.
  1121. .
  1122.         Examples:
  1123.              See TESTDATE.PAS
  1124. .
  1125.         Comments:
  1126. .
  1127.         See also:
  1128.  
  1129. unit ƒShƒDatPk
  1130.         ƒTODAY
  1131.         Declarations:
  1132.              function Today  : LongInt;
  1133. .
  1134.         Purpose:
  1135.              Returns the system date as a Julian Day-Number.
  1136. .
  1137.         Examples:
  1138.              See TESTDATE.PAS
  1139. .
  1140.         Comments:
  1141. .
  1142.         See also:
  1143.  
  1144. unit ƒShƒDatPk
  1145.         ƒTODAY2ANSI
  1146.         Declarations:
  1147.              function Today2ANSI : string;
  1148. .
  1149.         Purpose:
  1150.              Returns the system date as an ANSI date string (YYYYMMDD).
  1151. .
  1152.         Examples:
  1153.              See TESTDATE.PAS
  1154. .
  1155.         Comments:
  1156.              Note that the ANSI date format is both sortable and
  1157.         readable.
  1158. .
  1159.         See also:
  1160.  
  1161. unit ƒShƒDatPk
  1162.         ƒTODAY2GREG
  1163.         Declarations:
  1164.              procedure Today2Greg(var G : GregType);
  1165. .
  1166.         Purpose:
  1167.              Returns the system date as a Gregorian date record.
  1168. .
  1169.         Examples:
  1170.              See TESTDATE.PAS
  1171. .
  1172.         Comments:
  1173. .
  1174.         See also:
  1175.  
  1176. unit ƒShƒDatPk
  1177.         ƒTODAYSTR
  1178.         Declarations:
  1179.              function TodayStr(Delim : string) : string;
  1180. .
  1181.         Purpose:
  1182.              Returns the system date as a string of the form MMdDDdYYYY,
  1183.         where the separator, "d", is Delim[1].}
  1184. .
  1185.         Examples:
  1186.              See TESTDATE.PAS
  1187. .
  1188.         Comments:
  1189. .
  1190.         See also:
  1191.  
  1192. unit ƒShƒErrMsg
  1193.         CHECKON
  1194.         ƒCHECKOFF
  1195.         Declarations:
  1196.              procedure CheckOn;
  1197.              procedure CheckOff;
  1198. .
  1199.         Purpose:
  1200.              Enables/disables the error reporting facilities of ShErrMsg.
  1201. .
  1202.         Examples:
  1203.              ∙∙∙
  1204.              CheckOff; {Turn off error reporting}
  1205.              ∙∙∙
  1206.              CheckOn;  {Turn error reporting back on}
  1207. .
  1208.         Comments:
  1209.              The default state following initialization is CheckOn.
  1210.  
  1211. unit ƒShƒErrMsg
  1212.         ƒHALTMSG
  1213.         Declarations:
  1214.              procedure HaltMsg(Code : word; Msg : string);
  1215. .
  1216.         Purpose:
  1217.              To stop execution of the program, returning an error code to
  1218.         DOS and optionally displaying a message.
  1219. .
  1220.         Examples:
  1221.              ∙∙∙
  1222.              HaltMsg(1000, 'Exiting on a problem in procedure FOO_BAZ');
  1223. .
  1224.         Comments:
  1225.              If Checking is ON, execution will stop with the message, and
  1226.         a return code of 1000 will be passed to DOS.
  1227. .
  1228.                     ErrorLevel 1000
  1229.                        Exiting on a problem in procedure FOO_BAZ
  1230. .
  1231.              If checking is OFF, execution will stop with no message, and
  1232.         a return code of 1000 will be passed to DOS.
  1233. .
  1234.              In either case, due to the way in which DOS is implemented,
  1235.         an
  1236. .
  1237.                                   IF ERRORLEVEL
  1238. .
  1239.         command will be sensitive ONLY TO THE LOW BYTE of the code. Thus,
  1240.         in the above example, DOS will see a return code of 232.
  1241. .
  1242.         See also:
  1243.              RunErrorMsg
  1244.  
  1245. unit ƒShƒErrMsg
  1246.         ƒRUNERRORMSG
  1247.         Declarations:
  1248.              procedure RunErrorMsg(Code : integer; Msg : string);
  1249. .
  1250.         Purpose:
  1251.              To stop execution of the program with a runtime error
  1252.         message, optionally augmented by an additional information
  1253.         message, and returning an error code to DOS.
  1254. .
  1255.         Examples:
  1256.              ∙∙∙
  1257.              RunErrorMsg(1000, 'Problem in procedure FOO_BAZ');
  1258. .
  1259.         Comments:
  1260.              If Checking is ON, execution will stop with the following
  1261.         message, and a return code of 1000 will be passed to DOS.
  1262. .
  1263.                            Runtime error 1000 at 0C8F:0008
  1264.                               Problem in procedure FOO_BAZ
  1265. .
  1266.              If checking is OFF, execution will stop with the following
  1267.         message, and a return code of 1000 will be passed to DOS.
  1268. .
  1269.                            Runtime error 232 at 0000:C8F8
  1270. .
  1271.              In either case, due to the way in which DOS is implemented,
  1272.         an
  1273. .
  1274.                                   IF ERRORLEVEL
  1275. .
  1276.         command will be sensitive ONLY TO THE LOW BYTE of the code. Thus,
  1277.         in the above example, DOS will see a return code of 232.
  1278. .
  1279.              Note also that, if checking if turned off, the error address
  1280.         is not normalized.
  1281. .
  1282.         See also:
  1283.              HaltMsg
  1284.  
  1285. unit ƒShƒList
  1286.              ƒslƒNodePtr = ^slNode;
  1287.              ƒslƒNode    = record
  1288.                            Data  : pointer;
  1289.                            Next  : slNodePtr;
  1290.                            end;
  1291.              ƒdlƒNodePtr = ^dlNode;
  1292.              ƒdlƒNode    = record
  1293.                            Data  : pointer;
  1294.                            Next,
  1295.                            Prev  : dlNodePtr;
  1296.                            end;
  1297.              These are the basic node structures of the nodes for singly
  1298.         and doubly linked nodes. They will be of no particular interest
  1299.         to you unless you need to modify the code of the unit.
  1300.  
  1301. unit ƒShƒList
  1302.              ƒslƒList    = record
  1303.                            DataRecSize : word;
  1304.                            Count       : LongInt;
  1305.                            Head,
  1306.                            Tail,
  1307.                            Current     : slNodePtr;
  1308.                            end;
  1309.              ƒdlƒList    = record
  1310.                            DataRecSize : word;
  1311.                            Count       : LongInt;
  1312.                            Head,
  1313.                            Tail,
  1314.                            Current     : dlNodePtr;
  1315.                            end;
  1316.              These are the structures of the singly and doubly linked
  1317.         lists, respectively. You will be passing a variable of one of
  1318.         these types to almost all of the routines in the unit. The actual
  1319.         details of the structure need not concern you, however, unless
  1320.         you need to modify the code of the unit.
  1321.  
  1322. unit ƒShƒList
  1323.              ƒdlƒLessFunc = function(var DataRec1, DataRec2)  : boolean;
  1324.              This is the form of a function which you will need to con-
  1325.         struct if you are using the dlPutSorted routine. It is used to
  1326.         determine the sort order of your data records. Its use is identi-
  1327.         cal in concept to the "less" function of the TurboSort, TpSort,
  1328.         or OpSort units.
  1329.  
  1330. unit ƒShƒList
  1331.         ƒAPPEND
  1332.         Declarations:
  1333.              function ƒslAppend(var L : slList; var DataRec) : boolean;
  1334.              function ƒdlAppend(var L : dlList; var DataRec) : boolean;
  1335. .
  1336.         Purpose:
  1337.              Appends a data record to an existing list. If the list is
  1338.         empty, Append simply places the record in the list.
  1339. .
  1340.         Comments:
  1341.              The list must have been initialized prior to calling Append.
  1342.         Append returns a value of "false" if insufficient heap space is
  1343.         available for allocation of the node and data record.
  1344. .
  1345.         Examples:
  1346.              if not slAppend(MyList, MyDataRecord) then begin
  1347.                {Execute your recovery code}
  1348.                end;
  1349. .
  1350.         See Also:
  1351.              Put, PutPrev, PutSorted, Push
  1352.  
  1353. unit ƒShƒList
  1354.         ƒCOUNT
  1355.         Declarations:
  1356.              function ƒslCount(L : slList) : LongInt;
  1357.              function ƒdlCount(L : dlList) : LongInt;
  1358. .
  1359.         Purpose:
  1360.              Returns the number of items currently in the list.
  1361. .
  1362.         Comments:
  1363.              The item count is maintained continuously within the list
  1364.         structure, so it is not necessary to scan the list in order to
  1365.         generate the count.
  1366. .
  1367.         Examples:
  1368.              for T1 := 1 to slCount(MyList) do begin
  1369.                if slPop(MyList, MyDataRec) then ;
  1370.                (* Now process the record *)
  1371.                end; {for T1 := ...}
  1372. .
  1373.              This code will process each record in the list, and the list
  1374.         will be left empty on loop exit.
  1375.  
  1376. unit ƒShƒList
  1377.         ƒFREE
  1378.         Declarations:
  1379.              procedure ƒslFree(var L : slList);
  1380.              procedure ƒdlFree(var L : dlList);
  1381. .
  1382.         Purpose:
  1383.              Releases the heap space allocated for a list and its data.
  1384. .
  1385.         Comments:
  1386.              This procedure should be called as soon as you have com-
  1387.         pleted your operations on the specified list. The list must be
  1388.         re-initialized if it is to be reused.
  1389. .
  1390.         Examples:
  1391.              slFree(MyList);
  1392. .
  1393.              All heap space associated with "MyList" is released, follow-
  1394.         ing which all the internal pointers of "MyList" are set to "nil"
  1395.         and the associated data record length is set to zero.
  1396. .
  1397.         See Also:
  1398.              Init
  1399.  
  1400. unit ƒShƒList
  1401.         ƒGETCURRENT
  1402.         Declarations:
  1403.              function ƒslGetCurrent(var L : slList;
  1404.                                                   var DataRec) : boolean;
  1405.              function ƒdlGetCurrent(var L : dlList;
  1406.                                                   var DataRec) : boolean;
  1407. .
  1408.         Purpose:
  1409.              Returns the data record at the current node and does not
  1410.         move the node pointer. Returns a function value of false if the
  1411.         list is empty or the current node pointer is nil.
  1412. .
  1413.         Comments:
  1414.              This is essentially a "reread" operation. Normally, the cur-
  1415.         rent node pointer will have been positioned during the course of
  1416.         some other operation (e.g., GetFirst) and the data record will
  1417.         have been returned as a result of that prior operation.
  1418. .
  1419.         Examples:
  1420.              if not slGetCurrent(MyList, MyDataRec) then begin
  1421.                {Trying to read an empty list.}
  1422.                end;
  1423. .
  1424.         See Also:
  1425.              GetFirst GetNext GetLast GetPrev
  1426.  
  1427. unit ƒShƒList
  1428.         ƒGETFIRST
  1429.         Declarations:
  1430.              function ƒslGetFirst(var L : slList; var DataRec) : boolean;
  1431.              function ƒdlGetFirst(var L : dlList; var DataRec) : boolean;
  1432. .
  1433.         Purpose:
  1434.              Returns the data record at the head of the list. Sets the
  1435.         current node pointer to the head of the list. Returns a function
  1436.         value of false if the list is empty.
  1437. .
  1438.         Comments:
  1439. .
  1440.         Examples:
  1441.              if not slGetFirst(MyList, MyDataRec) then begin
  1442.                {Trying to read an empty list.}
  1443.                end;
  1444. .
  1445.         See Also:
  1446.              GetCurrent GetNext GetLast GetPrev
  1447.  
  1448. unit ƒShƒList
  1449.         ƒGETLAST
  1450.         Declarations:
  1451.              function ƒslGetLast(var L : slList; var DataRec) : boolean;
  1452.              function ƒdlGetLast(var L : dlList; var DataRec) : boolean;
  1453. .
  1454.         Purpose:
  1455.              Returns the data record at the tail of the list. Sets the
  1456.         current node pointer to the tail of the list. Returns a function
  1457.         value of false if the list is empty.
  1458. .
  1459.         Comments:
  1460. .
  1461.         Examples:
  1462.              if not slGetLast(MyList, MyDataRec) then begin
  1463.                {Trying to read an empty list.}
  1464.                end;
  1465. .
  1466.         See Also:
  1467.              GetCurrent GetFirst GetNext GetPrev
  1468.  
  1469. unit ƒShƒList
  1470.         ƒGETNEXT
  1471.         Declarations:
  1472.              function ƒslGetNext(var L : slList; var DataRec) : boolean;
  1473.              function ƒdlGetNext(var L : dlList; var DataRec) : boolean;
  1474. .
  1475.         Purpose:
  1476.              Returns the next data record in the list. Sets the current
  1477.         node pointer to the record retrieved. Returns a function value of
  1478.         false if the list is empty or if the last record successfully
  1479.         retrieved was at the list tail. In this latter case, calling
  1480.         slGetNext or dlGetNext again will retrieve the head of the list.
  1481. .
  1482.         Comments:
  1483. .
  1484.         Examples:
  1485.           {The following example assumes boolean short-circuiting ($B+)}
  1486.              if (not slGetNext(MyList, MyDataRec))
  1487.                {slGetNext false means an empty list or end of list}
  1488.                and slGetNext(MyList, MyDataRec) then begin
  1489.                {processing the head of the list}
  1490.                end
  1491.              else begin
  1492.                {processing the normal "next" element in the list}
  1493.                end;
  1494. .
  1495.         See Also:
  1496.              GetCurrent GetFirst GetLast GetPrev
  1497.  
  1498. unit ƒShƒList
  1499.         ƒGETPREV
  1500.         Declarations:
  1501.              function ƒdlGetPrev(var L : dlList; var DataRec) : boolean;
  1502. .
  1503.         Purpose:
  1504.              Same as dlGetNext, but in the opposite direction. Returns
  1505.         the previous data record in the list. Sets the current node
  1506.         pointer to the record retrieved. Returns a function value of
  1507.         false if the list is empty or if the last record successfully
  1508.         retrieved was at the list head. In this latter case, calling
  1509.         dlGetPrev again will retrieve the tail of the list.
  1510. .
  1511.         Comments:
  1512.              Note that the GetPrev operation can only be performed on
  1513.         doubly linked lists. There is no equivalent operation for singly
  1514.         linked lists.
  1515. .
  1516.         Examples:
  1517.           {The following example assumes boolean short-circuiting ($B+)}
  1518.              if (not dlGetPrev(MyList, MyDataRec))
  1519.                {dlGetPrev false means an empty list or top of list}
  1520.                and dlGetPrev(MyList, MyDataRec) then begin
  1521.                {processing the tail of the list}
  1522.                end
  1523.              else begin
  1524.                {processing the normal "prior" element in the list}
  1525.                end;
  1526. .
  1527.         See Also:
  1528.              GetCurrent GetFirst GetLast GetNext
  1529.  
  1530. unit ƒShƒList
  1531.         ƒLISTINIT
  1532.         Declarations:
  1533.              procedure ƒslListInit(var L : slList; RecSize : word);
  1534.              procedure ƒdlListInit(var L : dlList; RecSize : word);
  1535. .
  1536.         Purpose:
  1537.              Initializes a singly or doubly linked list, as appropriate.
  1538. .
  1539.         Comments:
  1540.              The list initialization routines initialize only the vari-
  1541.         ables of type slList or dlList. They perform no memory alloca-
  1542.         tion. Memory allocation is performed only by the various PUT
  1543.         routines.
  1544. .
  1545.              The ListInit routines **must** be called before any attempt
  1546.         is made to place any data in, or retrieve any data from any
  1547.         LIST-type variable. Also, once an initialized list has received
  1548.         data, ListInit **must not** be called prior to a call to Free.
  1549.         Failure to observe either of these warnings will produce
  1550.         unpredictable but probably disastrous results.
  1551. .
  1552.         Examples:
  1553.              slListInit(MyList);
  1554. .
  1555.         See Also:
  1556.              Free
  1557.  
  1558. unit ƒShƒList
  1559.         ƒPOP
  1560.         Declarations:
  1561.              function ƒslPop(var L : slList; var DataRec) : boolean;
  1562.              function ƒdlPop(var L : dlList; var DataRec) : boolean;
  1563. .
  1564.         Purpose:
  1565.              Returns the data record at the head of the list, then deal-
  1566.         locates the space associated with the data record and node. Re-
  1567.         turns a function value of false if the list is empty.
  1568. .
  1569.         Comments:
  1570. .
  1571.         Examples:
  1572.              while slPop(MyList, MyDataRec) do begin
  1573.                {process the retrieved record}
  1574.                end;
  1575. .
  1576.              This code will retrieve each record on the list and free up
  1577.         the space associated with each, as it is retrieved. You will end
  1578.         up with an empty list.
  1579. .
  1580.         See Also:
  1581.              Push Free
  1582.  
  1583. unit ƒShƒList
  1584.         ƒPUSH
  1585.         Declarations:
  1586.              function ƒslPush(var L : slList; var DataRec) : boolean;
  1587.              function ƒdlPush(var L : dlList; var DataRec) : boolean;
  1588. .
  1589.         Purpose:
  1590.              Pushes a data record onto the top of the list. Returns a
  1591.         function value of false if there is insufficient heap space to
  1592.         accommodate the list node and data record.
  1593. .
  1594.         Comments:
  1595. .
  1596.         Examples:
  1597.              if not slPush(MyList, MyDataRec) then begin
  1598.                {perform recovery operations}
  1599.                end;
  1600. .
  1601.         See Also:
  1602.              Append Put PutPrev PutSorted Pop
  1603.  
  1604. unit ƒShƒList
  1605.         ƒPUT
  1606.         Declarations:
  1607.              function ƒslPut(var L : slList; var DataRec) : boolean;
  1608.              function ƒdlPut(var L : dlList; var DataRec) : boolean;
  1609. .
  1610.         Purpose:
  1611.              Inserts a data record following the current node; returns
  1612.         with current pointer directed to the new node. Returns a function
  1613.         value of false if there is insufficient heap space to accommodate
  1614.         the list node and data record.
  1615. .
  1616.         Comments:
  1617. .
  1618.         Examples:
  1619.              if not slPut(MyList, MyDataRec) then begin
  1620.                {perform recovery operations}
  1621.                end;
  1622. .
  1623.         See Also:
  1624.              Append Push PutPrev PutSorted Pop
  1625.  
  1626. unit ƒShƒList
  1627.         ƒPUTPREV
  1628.         Declarations:
  1629.              function ƒdlPutPrev(var L : dlList; var DataRec) : boolean;
  1630. .
  1631.         Purpose:
  1632.              Inserts a data record ahead of the current node; returns
  1633.         with current pointer directed to the new node. Returns a function
  1634.         value of false if there is insufficient heap space to accommodate
  1635.         the list node and data record.
  1636. .
  1637.         Comments:
  1638.              Note that the PutPrev operation can only be performed on
  1639.         doubly linked lists. There is no equivalent operation for singly
  1640.         linked lists.
  1641. .
  1642.         Examples:
  1643.              if not dlPutPrev(MyList, MyDataRec) then begin
  1644.                {perform recovery operations}
  1645.                end;
  1646. .
  1647.         See Also:
  1648.              Append GetPrev Push Put PutSorted
  1649.  
  1650. unit ƒShƒList
  1651.         ƒPUTSORTED
  1652.         Declarations:
  1653.              function ƒdlPutSorted(var L : dlList; var DataRec;
  1654.                                            Less : dlLessFunc) : boolean;
  1655. .
  1656.         Purpose:
  1657.              Inserts a data record into the list in sorted order, as
  1658.         determined by the user-defined boolean function LESS. Returns a
  1659.         function value of false if there is insufficient heap space to
  1660.         accommodate the list node and data record.
  1661. .
  1662.         Comments:
  1663.              The function LESS is a user-defined boolean function whose
  1664.         declaration **must** be of the form
  1665. .
  1666.              function Less(var Rec1, Rec2) :boolean;
  1667. .
  1668.         and **must** be compiled under the FAR model.
  1669. .
  1670.              Note that the PutSorted operation can only be performed on
  1671.         doubly linked lists. There is no equivalent operation for singly
  1672.         linked lists.
  1673. .
  1674.              Note also that, to build the sorted list in descending order
  1675.         rather than ascending, it is only necessary to reverse the sense
  1676.         of the inequality in the comparison function.
  1677. .
  1678.         Examples:
  1679.              {$F+}
  1680.              function MyLess(var MyRec1, MyRec2) : boolean;
  1681.                begin
  1682.                  MyLess := (MyRecType(MyRec1).FieldA <
  1683.                              MyRecType(MyRec2).FieldA);
  1684.                  end;
  1685.              {$F-}
  1686.              ...
  1687.              if not dlPutSorted(MyList, MyDataRec, @MyLess) then begin
  1688.                {do something}
  1689.                end;
  1690.              Incorrect!!! The @-symbol cannot be used here.
  1691. .
  1692.              if not dlPutSorted(MyList, MyDataRec, MyLess) then begin
  1693.                {do something}
  1694.                end;
  1695.              Correct. Only the function name is passed.
  1696. .
  1697.         See Also:
  1698.              Append GetPrev Push Put PutPrev
  1699.  
  1700. unit ƒShƒList
  1701.         ƒSPACEUSED
  1702.         Declarations:
  1703.              function ƒslSpaceUsed(L : slList) : LongInt;
  1704.              function ƒdlSpaceUsed(L : dlList) : LongInt;
  1705. .
  1706.         Purpose:
  1707.              Returns the total amount of heap space currently allocated
  1708.         to the list and its data.
  1709. .
  1710.         Comments:
  1711. .
  1712.         Examples:
  1713.              WriteLn(slSpaceUsed(MyList), ' total bytes used');
  1714. .
  1715.         See Also:
  1716.              Count
  1717.  
  1718. unit ƒShƒLngStr
  1719.              ƒLongStringType  = record
  1720.                                  Length,           {Dynamic length}
  1721.                                  dLength : word;   {"Declared" length}
  1722.                                  lsData  : array[1..1] of char;
  1723.                                  end;
  1724.              The record structure allocated on the heap for the storage
  1725.         of LongString data.
  1726. .
  1727.              ƒLongString      = ^LongStringType;
  1728.              The type expected as actual parameters to the routines in
  1729.         this unit; also, the type returned by most of the functions.
  1730. .
  1731.              ƒlsCompType      = (Less, Equal, Greater);
  1732.              The type returned by the LongString comparison functions.
  1733. .
  1734.              ƒlsDelimSetType  = set of char;
  1735.              The type of the set of characters which the GetNext routines
  1736.         will use as word delimiters.
  1737. .
  1738.              ƒRingSize : byte = 25;
  1739.              The number of elements in the ring buffer, used to store
  1740.         pointers returned by function calls of type LongString. This
  1741.         value may be freely increased to a maximum value of 100 during
  1742.         program execution, if necessary. Decreasing it, however, could
  1743.         result in orphan blocks allocated on the heap, with no way to
  1744.         recover them.
  1745. .
  1746.              ƒlsDelimSet  : lsDelimSetType = [#0..#32];
  1747.              The typed constant used by the GetNext routines to determine
  1748.         the end of a substring to be returned. It may be freely changed
  1749.         during program execution.
  1750. .
  1751.              ƒMaxLongString = 65517;
  1752.              The maximum length of a LongString.
  1753. .
  1754.              ƒNotFound = 0;
  1755.              Returned by the lsPos functions if a substring is not found.
  1756.  
  1757. unit ƒShƒLngStr
  1758.         ƒlsCENTER
  1759.         Declarations:
  1760.              procedure lsCenter
  1761.                   (A: LongString; Width: word; B: LongString);
  1762.              function ƒlsƒCenterF
  1763.                   (A: LongString; Width: word): LongString;
  1764. .
  1765.         Purpose:
  1766.              Return a LongString centered in a LongString of blanks with
  1767.         specified width.
  1768. .
  1769.         Examples:
  1770.              If             A contains "abcdefg"
  1771.              then           lsCenter(A, 13, B);
  1772.              results in     B containing "   abcdefg   "
  1773. .
  1774.         Comments:
  1775.              If the length of A already exceeds Width, A will be returned
  1776.         unchanged.
  1777. .
  1778.         See Also:
  1779.              lsCenterCh
  1780.  
  1781. unit ƒShƒLngStr
  1782.         ƒlsCENTERCH
  1783.         Declarations:
  1784.              procedure lsCenterCh
  1785.                   (A: LongString; Ch: Char; Width: word; B: LongString);
  1786.              function ƒlsƒCenterChF
  1787.                   (A: LongString; Ch: Char; Width: word): LongString;
  1788. .
  1789.         Purpose:
  1790.              Return a LongString centered in a LongString of Ch with spe-
  1791.         cified width.
  1792. .
  1793.         Examples:
  1794.              If             A contains "abcdefg"
  1795.              then           lsCenterCh(A, '+', 13, B);
  1796.              results in     B containing "+++abcdefg+++"
  1797. .
  1798.         Comments:
  1799.              If the length of A already exceeds Width, A will be returned
  1800.         unchanged.
  1801. .
  1802.         See Also:
  1803.              lsCenter
  1804.  
  1805. unit ƒShƒLngStr
  1806.         ƒlsCHARSTR
  1807.         Declarations:
  1808.              procedure lsCharStr
  1809.                   (Ch: Char; Len: word; A: LongString);
  1810.              function ƒlsƒCharStrF
  1811.                   (Ch: Char; Len: word): LongString;
  1812. .
  1813.         Purpose:
  1814.              Return a LongString of length Len filled with Ch.
  1815. .
  1816.         Examples:
  1817.              The call       lsCharStr('+', 10, A);
  1818.              results in     A containing "++++++++++"
  1819. .
  1820.         Comments:
  1821.              If Len is greater than the maximum length of A, the returned
  1822.         LongString will be equal in length to the maximum length of A.
  1823. .
  1824.         See Also:
  1825.  
  1826. unit ƒShƒLngStr
  1827.         ƒlsCOMP
  1828.         Declarations:
  1829.              function lsƒComp
  1830.                   (A1, A2: LongString): lsCompType;
  1831. .
  1832.         Purpose:
  1833.              Compares A1 to A2, returning LESS, EQUAL, or GREATER.
  1834. .
  1835.         Examples:
  1836.                 For a normal COMPARE,
  1837.                         case lsComp(LS1, LS2) of
  1838.                           LESS    : {Do This}
  1839.                           EQUAL   : {Do That}
  1840.                           GREATER : {Do The Other}
  1841.                           end; {case lsComp}
  1842. .
  1843.                 For a case-insensitive COMPARE,
  1844.                         case lsComp(lsUpcaseF(LS1), lsUpcaseF(LS2)) of
  1845.                           LESS    : {Do This}
  1846.                           EQUAL   : {Do That}
  1847.                           GREATER : {Do The Other}
  1848.                           end; {case lsComp}
  1849. .
  1850.         Comments:
  1851.              This function completely implements the analog of the string
  1852.         comparison operators of Turbo Pascal.
  1853. .
  1854.         See Also:
  1855.  
  1856. unit ƒShƒLngStr
  1857.         ƒlsCONCAT
  1858.         Declarations:
  1859.              procedure lsConcat
  1860.                   (A, B, C: LongString);
  1861.              function ƒlsƒConcatF
  1862.                   (A, B: LongString): LongString;
  1863.              procedure lsConcatLs2Str
  1864.                   (S: string; A: LongString; C: LongString);
  1865.              function ƒlsƒConcatLs2StrF
  1866.                   (S: string; A: LongString): LongString;
  1867.              procedure lsConcatStr2Ls
  1868.                   (A: LongString; S: string; C: LongString);
  1869.              function ƒlsƒConcatStr2LsF
  1870.                   (A: LongString; S: string): LongString;
  1871. .
  1872.         Purpose:
  1873.              Concatenate the second parameter to the end of the first.
  1874. .
  1875.         Examples:
  1876.              If             A contains "abcdefg"
  1877.              and            B contains "hijklmn"
  1878.              then           lsConcat(A, B, C);
  1879.              results in     C containing "abcdefghijklmn"
  1880. .
  1881.         Comments:
  1882. .
  1883.         See Also:
  1884.  
  1885. unit ƒShƒLngStr
  1886.         ƒlsCOPY
  1887.         Declarations:
  1888.              procedure lsCopy
  1889.                   (A: LongString; Start, Len: word; B: LongString);
  1890.              function ƒlsƒCopyF
  1891.                   (A: LongString; Start, Len: word): LongString;
  1892. .
  1893.         Purpose:
  1894.              Return a LongString substring of A. The substring begins at
  1895.         position Start of A and will be of length Len.
  1896. .
  1897.         Examples:
  1898.              If             A contains "abcdefg"
  1899.              then           lsCopy(A, 4, 3, B);
  1900.              results in     B containing "def"
  1901. .
  1902.              If             A contains "abcdefg"
  1903.              then           lsCopy(A, 4, 10, B);
  1904.              results in     B containing "defg"
  1905. .
  1906.         Comments:
  1907.              Start=1 for first char in A.
  1908.  
  1909.              If Start > lsLength(A), an empty LongString will be
  1910.         returned.
  1911. .
  1912.              If Start+Len exceeds the length of A, the returned
  1913.         LongString will be of length lsLength(A)-Start+1.
  1914. .
  1915.         See Also:
  1916.  
  1917. unit ƒShƒLngStr
  1918.         ƒlsCOUNT
  1919.         Declarations:
  1920.              function lsƒCount
  1921.                   (A, Obj: LongString):  word;
  1922.              function ƒlsƒCountStr
  1923.                   (A: LongString; Obj: string): word;
  1924.              function ƒlsƒCountStrUC
  1925.                   (A: LongString; Obj: string): word;
  1926.              function ƒlsƒCountUC
  1927.                   (A, Obj: LongString):  word;
  1928. .
  1929.         Purpose:
  1930.              Returns the total number of non-overlapping occurrences of
  1931.         Obj in A.
  1932. .
  1933.         Examples:
  1934.              if lsCountStrUC(MyLS, 'abc') <> NotFound then {Do something}
  1935. .
  1936.              If             A contains "abcdeabcdeabcde"
  1937.              and            Obj contains "BCD"
  1938.              then           lsCount(A, Obj)
  1939.              returns        NotFound ( = 0 )
  1940.              but            lsCountUC(A, Obj)
  1941.              returns        3
  1942. .
  1943.         Comments:
  1944.              If Obj is not a substring of A, returns NotFound (i.e., 0).
  1945. .
  1946.         See Also:
  1947.  
  1948. unit ƒShƒLngStr
  1949.         ƒlsDELALL
  1950.         Declarations:
  1951.              procedure lsDelAll
  1952.                   (A, Obj, B: LongString);
  1953.              function ƒlsƒDelAllF
  1954.                   (A, Obj: LongString):  LongString;
  1955.              procedure lsDelAllStr
  1956.                   (A: LongString; Obj: string; B: LongString);
  1957.              function ƒlsƒDelAllStrF
  1958.                   (A: LongString; Obj: string): LongString;
  1959.              procedure lsDelAllStrUC
  1960.                   (A: LongString; Obj: string; B: LongString);
  1961.              function ƒlsƒDelAllStrUCF
  1962.                   (A: LongString; Obj: string): LongString;
  1963.              procedure lsDelAllUC
  1964.                   (A, Obj, B: LongString);
  1965.              function ƒlsƒDelAllUCF
  1966.                   (A, Obj: LongString):  LongString;
  1967. .
  1968.         Purpose:
  1969.              Deletes all occurrences of Obj in A.
  1970. .
  1971.         Examples:
  1972.              See below.
  1973. .
  1974.         Comments:
  1975.              Should the deletion of Obj from A result in a new occurrence
  1976.         of Obj in A, the new occurrence will not be deleted, e.g.,
  1977. .
  1978.              If             A contains 'aabcbcabcd'
  1979.              and            Obj contains 'abc'
  1980.              then           lsDelAll(A, Obj, B);
  1981.              results in     B containing 'abcd'
  1982.              and not        'd'
  1983. .
  1984.              To delete all occurrences including such incidental
  1985.         occurrences, one would use, e.g.,
  1986. .
  1987.                             repeat
  1988.                               lsDelAll(A, Obj, A);
  1989.                               until lsCount(A, Obj) = 0;
  1990. .
  1991.         See Also:
  1992.              lsRepAll   lsCount
  1993.  
  1994. unit ƒShƒLngStr
  1995.         ƒlsDELETE
  1996.         Declarations:
  1997.              procedure lsDelete
  1998.                   (A: LongString; Start, Len: word; B: LongString);
  1999.              function ƒlsƒDeleteF
  2000.                   (A: LongString; Start, Len: word): LongString;
  2001. .
  2002.         Purpose:
  2003.              Delete Len characters of A, starting at position Start.
  2004. .
  2005.         Examples:
  2006.              If             A contains "abcdefg"
  2007.              then           lsDelete(A, 4, 3, B);
  2008.              results in     B containing "abcg"
  2009. .
  2010.              If             A contains "abcdefg"
  2011.              then           lsDelete(A, 4, 10, B);
  2012.              results in     B containing "abc"
  2013. .
  2014.         Comments:
  2015.              If Start is greater than the length of A, B = A on output.
  2016. .
  2017.         See Also:
  2018.              lsDelAll   lsRepAll
  2019.  
  2020. unit ƒShƒLngStr
  2021.         ƒlsDISPOSE
  2022.         Declarations:
  2023.              procedure lsDispose
  2024.                   (var A: LongString);
  2025. .
  2026.         Purpose:
  2027.              Dispose of A, releasing its heap space.
  2028. .
  2029.         Examples:
  2030.              The call       lsDispose(A);
  2031.              results in     All heap space associated with A is released
  2032.              and            A = nil
  2033. .
  2034.         Comments:
  2035. .
  2036.         See Also:
  2037.              lsInit
  2038.  
  2039. unit ƒShƒLngStr
  2040.         ƒlsGETNEXT
  2041.         Declarations:
  2042.              procedure lsGetNext
  2043.                   (LS1, LS2: LongString);
  2044.              function ƒlsƒGetNextF
  2045.                   (LS1: LongString): LongString;
  2046.              procedure lsGetNextStr
  2047.                   (LS1: LongString; var S2: string);
  2048.              function ƒlsƒGetNextStrF
  2049.                   (LS1: LongString): string;
  2050. .
  2051.         Purpose:
  2052.              Returns the next substring of LS1 which is delimited by a
  2053.         member of lsDelimSet.
  2054. .
  2055.         Examples:
  2056.              If             A contains "abc def ghi jkl"
  2057.              then the two calls
  2058.                             lsGetNext(A, B);
  2059.                             lsGetNext(A, B);
  2060.              result in      A containing " ghi jkl"
  2061.              and            B containing "def"
  2062. .
  2063.         Comments:
  2064.              On return, LS1 is returned untrimmed, but with the first
  2065.         matching substring deleted.
  2066. .
  2067.         See Also:
  2068.  
  2069. unit ƒShƒLngStr
  2070.         ƒlsINIT
  2071.         Declarations:
  2072.              function lsƒInit
  2073.                   (var A: LongString; L: word): boolean;
  2074. .
  2075.         Purpose:
  2076.              "Declares" a LongString of maximum declared length L and
  2077.         establishes space for it on the heap.
  2078. .
  2079.         Examples:
  2080.              The call       if lsInit(A, 750) then {Do something};
  2081.              results in     a. A returned function value of "true"
  2082.                             b. 754 bytes being allocated on the heap.
  2083.                                (750 bytes for the character string,
  2084.                                 4 overhead bytes.)
  2085.                             c. A containing a pointer to the heap space.
  2086. .
  2087.              The call       lsInit(A, 65518);   {MaxLongString = 65517}
  2088.              results in     a. A returned function value of "false"
  2089.                             b. No space allocation on the heap.
  2090.                             c. A = nil
  2091. .
  2092.         Comments:
  2093.              Returns false if L is greater than MaxLongString.
  2094. .
  2095.              If there is insufficient heap space to accommodate the
  2096.         LongString, the program will terminate with a run-time error of
  2097.         250 (if lsInit has been called directly) or 251 (if lsInit has
  2098.         been called while attempting to allocate space on the ring
  2099.         buffer.
  2100. .
  2101.         See Also:
  2102.              lsDispose
  2103.  
  2104. unit ƒShƒLngStr
  2105.         ƒlsIOFF
  2106.         Declarations:
  2107.              procedure lsIoff;
  2108. .
  2109.         Purpose:
  2110.              Turns I/O checking off during execution of lsReadLn and
  2111.         lsWriteLn.
  2112. .
  2113.         Examples:
  2114.                   lsIoff;
  2115.                   lsReadLn(MyFile, MyLS);
  2116.                   if lsIoResult <> 0 then {Do something}
  2117.                   lsIon;
  2118. .
  2119.         Comments:
  2120.              lsIoff, lsIon, and lsIoResult MUST be used for LongString
  2121.         I/O operations in place of $I-, $I+, and IoResult.
  2122. .
  2123.              Emulates at execution time the action of the $I- compiler
  2124.         directive, but only for LongString I/O. The default state is
  2125.         "on".
  2126. .
  2127.              If I/O checking is off lsIoResult MUST be called after each
  2128.         call to lsReadLn or lsWriteLn. If I/O checking is on, and if an
  2129.         I/O error occurs, the program will terminate with a run-time
  2130.         error. This action duplicates the action of the IoResult function
  2131.         for normal I/O.
  2132. .
  2133.         See Also:
  2134.              lsIon     lsIoResult
  2135.  
  2136. unit ƒShƒLngStr
  2137.         ƒlsION
  2138.         Declarations:
  2139.              procedure lsIon;
  2140. .
  2141.         Purpose:
  2142.              Turns I/O checking on during execution of lsReadLn and
  2143.         lsWriteLn.
  2144. .
  2145.         Examples:
  2146.                   lsIoff;
  2147.                   lsReadLn(MyFile, MyLS);
  2148.                   if lsIoResult <> 0 then {Do something}
  2149.                   lsIon;
  2150. .
  2151.         Comments:
  2152.              lsIoff, lsIon, and lsIoResult MUST be used for LongString
  2153.         I/O operations in place of $I-, $I+, and IoResult.
  2154. .
  2155.              Emulates at execution time the action of the $I+ compiler
  2156.         directive, but only for LongString I/O. The default state is
  2157.         "on".
  2158. .
  2159.              If I/O checking is off lsIoResult MUST be called after each
  2160.         call to lsReadLn or lsWriteLn. If I/O checking is on, and if an
  2161.         I/O error occurs, the program will terminate with a run-time
  2162.         error. This action duplicates the action of the IoResult function
  2163.         for normal I/O.
  2164. .
  2165.         See Also:
  2166.              lsIoff    lsIoResult
  2167.  
  2168. unit ƒShƒLngStr
  2169.         ƒlsIORESULT
  2170.         Declarations:
  2171.              function lsƒIoResult: word;
  2172. .
  2173.         Purpose:
  2174.              Returns the IoResult of the last lsReadLn or lsWriteLn
  2175.         performed, and clears the internal variable used to store the
  2176.         value.
  2177. .
  2178.         Examples:
  2179.                   lsIoff;
  2180.                   lsReadLn(MyFile, MyLS);
  2181.                   if lsIoResult <> 0 then {Do something}
  2182.                   lsIon;
  2183. .
  2184.         Comments:
  2185.              lsIoff, lsIon, and lsIoResult MUST be used for LongString
  2186.         I/O operations in place of $I-, $I+, and IoResult.
  2187. .
  2188.              If I/O checking is off lsIoResult MUST be called after each
  2189.         call to lsReadLn or lsWriteLn. If I/O checking is on, and if an
  2190.         I/O error occurs, the program will terminate with a run-time
  2191.         error. This action duplicates the action of the IoResult function
  2192.         for normal I/O.
  2193. .
  2194.         See Also:
  2195.              lsIoff    lsIon
  2196.  
  2197. unit ƒShƒLngStr
  2198.         ƒlsINSERT
  2199.         Declarations:
  2200.              procedure lsInsert
  2201.                   (A, Obj: LongString; Start: word; B: LongString);
  2202.              function ƒlsƒInsertF
  2203.                   (A, Obj: LongString; Start: word): LongString;
  2204.              procedure lsInsertStr
  2205.                   (A: LongString; Obj: string; Start: word;
  2206.                                                           B: LongString);
  2207.              function ƒlsƒInsertStrF
  2208.                   (A: LongString; Obj: string; Start: word): LongString;
  2209. .
  2210.         Purpose:
  2211.              Insert Obj into A at position Start returning a new
  2212.         LongString.
  2213. .
  2214.         Examples:
  2215.              If             A contains "abcdef"
  2216.              and            Obj contains "ABC"
  2217.              then           lsInsert(A, Obj, 4, B);
  2218.              results in     B containing "abcABCdef"
  2219. .
  2220.         Comments:
  2221.              If Start > lsLength(A), no action is taken.
  2222. .
  2223.         See Also:
  2224.              lsDelete
  2225.  
  2226. unit ƒShƒLngStr
  2227.         ƒlsLEFTPAD
  2228.         Declarations:
  2229.              procedure lsLeftPad
  2230.                   (A: LongString; Len: word; B: LongString);
  2231.              function ƒlsƒLeftPadF
  2232.                   (A: LongString; Len: word): LongString;
  2233. .
  2234.         Purpose:
  2235.              Left-pad the LongString in A to length Len with blanks,
  2236.         returning a new LongString.
  2237. .
  2238.         Examples:
  2239.              If             A contains "abc"
  2240.              then           lsLeftPad(A, 5, B);
  2241.              results in     B containing "  abc"
  2242. .
  2243.         Comments:
  2244.              If Len < lsLength(A), A is returned truncated without
  2245.         padding.
  2246. .
  2247.         See Also:
  2248.              lsLeftPadCh     lsPad           lsPadCh
  2249.  
  2250. unit ƒShƒLngStr
  2251.         ƒlsLEFTPADCH
  2252.         Declarations:
  2253.              procedure lsLeftPadCh
  2254.                   (A: LongString; Ch: Char; Len: word; B: LongString);
  2255.              function ƒlsƒLeftPadChF
  2256.                   (A: LongString; Ch: Char; Len: word): LongString;
  2257. .
  2258.         Purpose:
  2259.              Left-pad the LongString in A to length Len with Ch,
  2260.         returning a new LongString.
  2261. .
  2262.         Examples:
  2263.              If             A contains "abc"
  2264.              then           lsLeftPad(A, '+', 5, B);
  2265.              results in     B containing "++abc"
  2266. .
  2267.         Comments:
  2268. .
  2269.         See Also:
  2270.              lsLeftPad       lsPad           lsPadCh
  2271.  
  2272. unit ƒShƒLngStr
  2273.         ƒlsLENGTH
  2274.         Declarations:
  2275.              function lsƒLength
  2276.                   (A: LongString): word;
  2277. .
  2278.         Purpose:
  2279.              Return the length of a LongString. A must have been
  2280.         initialized.
  2281. .
  2282.         Examples:
  2283.              If             A contains "Cogito, ergo sum."
  2284.              then           lsLength(A)
  2285.              returns        17
  2286. .
  2287.         Comments:
  2288. .
  2289.         See Also:
  2290.  
  2291. unit ƒShƒLngStr
  2292.         ƒlsLOCASE
  2293.         Declarations:
  2294.              procedure lsLocase
  2295.                   (A, B: LongString);
  2296.              function ƒlsƒLocaseF
  2297.                   (A: LongString): LongString;
  2298. .
  2299.         Purpose:
  2300.              Locase the LongString in A, returning a new LongString.
  2301. .
  2302.         Examples:
  2303.              If             A contains "ABCdefGHIjkl"
  2304.              then           lsLocase(A, B);
  2305.              results in     B containing "abcdefghijkl"
  2306. .
  2307.         Comments:
  2308. .
  2309.         See Also:
  2310.              lsUpcase
  2311.  
  2312. unit ƒShƒLngStr
  2313.         ƒlsLONGSTRING2STR
  2314.         Declarations:
  2315.              function lsƒLongString2Str
  2316.                   (A: LongString): string;
  2317. .
  2318.         Purpose:
  2319.              Convert a LongString to a Turbo string.
  2320. .
  2321.         Examples:
  2322.              If             A (LongString) contains "abcdef"
  2323.              then           lsLongString2Str(A)
  2324.              returns        'abcdef' (string)
  2325. .
  2326.         Comments:
  2327.              If lsLength(A) > 255, the returned string will be truncated
  2328.         to length 255.
  2329. .
  2330.         See Also:
  2331.              lsStr2LongString
  2332.  
  2333. unit ƒShƒLngStr
  2334.         ƒlsPAD
  2335.         Declarations:
  2336.              procedure lsPad
  2337.                   (A: LongString; Len: word; B: LongString);
  2338.              function ƒlsƒPadF
  2339.                   (A: LongString; Len: word): LongString;
  2340. .
  2341.         Purpose:
  2342.              Right-pad the LongString in A to length Len with blanks,
  2343.         returning a new LongString.
  2344. .
  2345.         Examples:
  2346.              If             A contains "abc"
  2347.              then           lsPad(A, 5, B);
  2348.              results in     B containing "abc  "
  2349. .
  2350.              but if         lsInit(C, 5) = true
  2351.              then           lsPad(A, 8, C);
  2352.              also results in  C containing "abc  "
  2353. .
  2354.         Comments:
  2355. .
  2356.         See Also:
  2357.              lsPadCh         lsLeftPad       lsLeftPadCh
  2358.  
  2359. unit ƒShƒLngStr
  2360.         ƒlsPADCH
  2361.         Declarations:
  2362.              procedure lsPadCh
  2363.                   (A: LongString; Ch: Char; Len: word; B: LongString);
  2364.              function ƒlsƒPadChF
  2365.                   (A: LongString; Ch: Char; Len: word): LongString;
  2366. .
  2367.         Purpose:
  2368.              Right-pad the LongString in A to length Len with Ch,
  2369.         returning a new LongString.
  2370. .
  2371.         Examples:
  2372.              If             A contains "abc"
  2373.              then           lsPadCh(A, '+', 5, B);
  2374.              results in     B containing "abc++"
  2375. .
  2376.              but if         lsInit(C, 5) = true
  2377.              then           lsPadCh(A, '+', 8, C);
  2378.              also results in  C containing "abc++"
  2379. .
  2380.         Comments:
  2381. .
  2382.         See Also:
  2383.              lsPad           lsLeftPad       lsLeftPadCh
  2384.  
  2385. unit ƒShƒLngStr
  2386.         ƒlsPOS
  2387.         Declarations:
  2388.              function lsƒPos
  2389.                   (Obj, A: LongString): word;
  2390.              function ƒlsƒPosStr
  2391.                   (Obj: string; A: LongString): word;
  2392.              function ƒlsƒPosUC
  2393.                   (Obj, A: LongString): word;
  2394.              function ƒlsƒPosStrUC
  2395.                   (Obj: string; A: LongString): word;
  2396. .
  2397.         Purpose:
  2398.              Return the position of Obj in A, returning NotFound if not
  2399.         found.
  2400. .
  2401.         Examples:
  2402.              If             A contains "abcdeabcdeabcde"
  2403.              and            Obj contains "BCD"
  2404.              then           lsPos(A, Obj)
  2405.              returns        NotFound ( = 0 )
  2406.              but            lsPosUC(A, Obj)
  2407.              returns        2
  2408. .
  2409.         Comments:
  2410. .
  2411.         See Also:
  2412.  
  2413. unit ƒShƒLngStr
  2414.         ƒlsPOSSET
  2415.         Declarations:
  2416.              function lsƒPosSet(A : CharSet; S : LongString) : byte;
  2417. .
  2418.         Purpose:
  2419.              Returns the position of the first occurrence of any member
  2420.         of A in S.
  2421. .
  2422.         Comments:
  2423.              This function is primarily intended for internal use.
  2424. .
  2425.         Examples:
  2426.                   If   S = 'X1Y2C3Z4B'
  2427.                   and  A = ['A','B','C']
  2428.                   then lsPosSet(A, S) will return 5.
  2429. .
  2430.         See also:
  2431.  
  2432. unit ƒShƒLngStr
  2433.         ƒlsREADLN
  2434.         Declarations:
  2435.              procedure lsReadLn
  2436.                   (var F: Text; A: LongString);
  2437. .
  2438.         Purpose:
  2439.              Read a LongString from a text file.
  2440. .
  2441.         Examples:
  2442.              lsReadLn(MyFile, A);
  2443. .
  2444.         Comments:
  2445.              If the "declared" length of A (set by lsInit) is less than
  2446.         the actual length of the line in the text file, the incoming
  2447.         string will be truncated to the "declared" length of A and the
  2448.         file will be positioned at the beginning of the next line (the
  2449.         exact analog of a normal Turbo PASCAL string ReadLn).
  2450.  
  2451.              If I/O checking is off lsIoResult MUST be called after each
  2452.         call to lsReadLn or lsWriteLn. If I/O checking is on, and if an
  2453.         I/O error occurs, the program will terminate with a run-time
  2454.         error. This action duplicates the action of the IoResult function
  2455.         for normal I/O.
  2456. .
  2457.         See Also:
  2458.              lsIoff    lsIon     lsIoResult     lsWriteLn
  2459.  
  2460. unit ƒShƒLngStr
  2461.         ƒlsREPALL
  2462.         Declarations:
  2463.              procedure lsRepAll
  2464.                   (A, Obj, Obj1, B: LongString);
  2465.              function ƒlsƒRepAllF
  2466.                   (A, Obj, Obj1: LongString):  LongString;
  2467.              procedure lsRepAllStr
  2468.                   (A: LongString; Obj, Obj1: string; B: LongString);
  2469.              function ƒlsƒRepAllStrF
  2470.                   (A: LongString; Obj, Obj1: string): LongString;
  2471.              procedure lsRepAllStrUC
  2472.                   (A: LongString; Obj, Obj1: string; B: LongString);
  2473.              function ƒlsƒRepAllStrUCF
  2474.                   (A: LongString; Obj, Obj1: string): LongString;
  2475.              procedure lsRepAllUC
  2476.                   (A, Obj, Obj1, B: LongString);
  2477.              function ƒlsƒRepAllUCF
  2478.                   (A, Obj, Obj1: LongString): LongString;
  2479. .
  2480.         Purpose:
  2481.              Replaces all occurrences of Obj in A with Obj1.
  2482. .
  2483.         Examples:
  2484.              If             A contains 'aabcbcabcd'
  2485.              and            Obj contains 'abc'
  2486.              and            Obj1 contains '12345'
  2487.              then           lsRepAll(A, Obj, Obj1, B);
  2488.              results in     B containing 'a12345bc12345d'
  2489. .
  2490.         Comments:
  2491.              Should the replacement of Obj by Obj1 in A result in a new
  2492.         occurrence of Obj in A, the new occurrence will not be replaced.
  2493.         To do so, except under rather unusual conditions, could result in
  2494.         a non-terminating condition.
  2495. .
  2496.         See Also:
  2497.              lsDelAll
  2498.  
  2499. unit ƒShƒLngStr
  2500.         ƒlsSIZEOF
  2501.         Declarations:
  2502.              function lsƒSizeOf
  2503.                   (A: LongString): word;
  2504. .
  2505.         Purpose:
  2506.              Returns the total heap space required for A, including the
  2507.         two control words. A must have been initialized.
  2508. .
  2509.         Examples:
  2510.              See below.
  2511. .
  2512.         Comments:
  2513.              lsSizeOf MUST be used to determine the effective size of a
  2514.         LongString. Any attempt to use SizeOf(A) will return a value of
  2515.         4; any attempt to use SizeOf(A^) will return a value of 5.
  2516.         Neither is particularly informative!
  2517. .
  2518.              Remember that, just as
  2519.                               SizeOf(StringVariable)
  2520.         returns a value one greater than the declared length of
  2521.         StringVariable, so
  2522.                            lsSizeOf(LongStringVariable)
  2523.         will return a value four greater than the "declared" length of
  2524.         LongStringVariable.
  2525. .
  2526.              If A has not been initialized, the results are
  2527.         unpredictable.
  2528. .
  2529.         See Also:
  2530.              lsLength
  2531.  
  2532. unit ƒShƒLngStr
  2533.         ƒlsSTR2LONGSTRING
  2534.         Declarations:
  2535.              procedure lsStr2LongString
  2536.                   (S: string; A: LongString);
  2537.              function ƒlsƒStr2LongStringF
  2538.                   (S: string): LongString;
  2539. .
  2540.         Purpose:
  2541.              Convert a Turbo string into a LongString.
  2542. .
  2543.         Examples:
  2544.              If             S (string) contains "abcdef"
  2545.              then           lsStr2LongString(S, A);
  2546.              results in     A (LongString) containing "abcdef"
  2547. .
  2548.         Comments:
  2549. .
  2550.         See Also:
  2551.              lsLongString2Str
  2552.  
  2553. unit ƒShƒLngStr
  2554.         ƒlsTRANSFER
  2555.         Declarations:
  2556.              procedure lsTransfer
  2557.                   (A, B: LongString);
  2558. .
  2559.         Purpose:
  2560.              Transfers the contents of A into B.
  2561. .
  2562.         Examples:
  2563.              B^ := A^;
  2564.              INCORRECT!! This construct will give unpredictable but guar-
  2565.         anteed incorrect results.
  2566. .
  2567.              lsTransfer(A, B);
  2568.              Correct. ALWAYS use lsTransfer to move the contents of one
  2569.         LongString into another.
  2570. .
  2571.         Comments:
  2572. .
  2573.         See Also:
  2574.  
  2575. unit ƒShƒLngStr
  2576.         ƒlsTRIM
  2577.         Declarations:
  2578.              procedure lsTrim
  2579.                   (A, B: LongString);
  2580.              function ƒlsƒTrimF
  2581.                   (A: LongString): LongString;
  2582. .
  2583.         Purpose:
  2584.              Return a LongString with leading and trailing white space
  2585.         removed.
  2586. .
  2587.         Examples:
  2588.              If             A contains "  Cogito, ergo sum.      "
  2589.              then           lsTrim(A, B);
  2590.              results in     B containing "Cogito, ergo sum."
  2591. .
  2592.         Comments:
  2593.              "White space" is any sequence of characters in the range
  2594.         #0..#32.
  2595. .
  2596.         See Also:
  2597.              lsTrimLead     lsTrimTrail
  2598.              lsTrimLeadSet  lsTrimSet      lsTrimTrailSet
  2599.  
  2600. unit ƒShƒLngStr
  2601.         ƒlsTRIMLEAD
  2602.         Declarations:
  2603.              procedure lsTrimLead
  2604.                   (A, B: LongString);
  2605.              function ƒlsƒTrimLeadF
  2606.                   (A: LongString): LongString;
  2607. .
  2608.         Purpose:
  2609.              Return a LongString with leading white space removed.
  2610. .
  2611.         Examples:
  2612.              If             A contains "  Cogito, ergo sum.      "
  2613.              then           lsTrimLead(A, B);
  2614.              results in     B containing "Cogito, ergo sum.      "
  2615. .
  2616.         Comments:
  2617.              "White space" is any sequence of characters in the range
  2618.         #0..#32.
  2619. .
  2620.         See Also:
  2621.              lsTrim         lsTrimTrail
  2622.              lsTrimLeadSet  lsTrimSet      lsTrimTrailSet
  2623.  
  2624. unit ƒShƒLngStr
  2625.         ƒlsTRIMTRAIL
  2626.         Declarations:
  2627.              procedure lsTrimTrail
  2628.                   (A, B: LongString);
  2629.              function ƒlsƒTrimTrailF
  2630.                   (A: LongString): LongString;
  2631. .
  2632.         Purpose:
  2633.           Return a LongString with trailing white space removed.
  2634. .
  2635.         Examples:
  2636.              If             A contains "  Cogito, ergo sum.      "
  2637.              then           lsTrimTrail(A, B);
  2638.              results in     B containing "  Cogito, ergo sum."
  2639. .
  2640.         Comments:
  2641.              "White space" is any sequence of characters in the range
  2642.         #0..#32.
  2643. .
  2644.         See Also:
  2645.              lsTrim         lsTrimLead
  2646.              lsTrimLeadSet  lsTrimSet      lsTrimTrailSet
  2647.  
  2648. unit ƒShƒLngStr
  2649.         ƒlsTRIMLEADSET
  2650.         Declarations:
  2651.              procedure lsTrimLeadSet
  2652.                   (A : LongString; CS : CharSet; B : LongString);
  2653.              function ƒlsƒTrimLeadSetF
  2654.                   (A : LongString; CS : CharSet) : LongString;
  2655. .
  2656.         Purpose:
  2657.              Returns a LongString with leading characters in CS stripped.
  2658. .
  2659.         Examples:
  2660.              See the file TESTLSTR.PAS
  2661. .
  2662.         Comments:
  2663.              CS contains an arbitrary set of characters.
  2664. .
  2665.         See also:
  2666.              lsTrimSet lsTrimTrailSet
  2667.              lsTrim    lsTrimLead     lsTrimTrail
  2668.  
  2669. unit ƒShƒLngStr
  2670.         ƒlsTRIMSET
  2671.         Declarations:
  2672.              procedure lsTrimSet
  2673.                   (A : LongString; CS : CharSet; B : LongString);
  2674.              function ƒlsƒTrimSetF
  2675.                   (A  : LongString; CS : CharSet) : LongString;
  2676. .
  2677.         Purpose:
  2678.              Returns a LongString with leading and trailing characters in
  2679.         CS stripped.
  2680. .
  2681.         Examples:
  2682.              See the file TESTLSTR.PAS
  2683. .
  2684.         Comments:
  2685.              CS contains an arbitrary set of characters.
  2686. .
  2687.         See also:
  2688.              lsTrimLeadSet  lsTrimTrailSet
  2689.              lsTrim         lsTrimLead     lsTrimTrail
  2690.  
  2691. unit ƒShƒLngStr
  2692.         ƒlsTRIMTRAILSET
  2693.         Declarations:
  2694.              procedure lsTrimTrailSet
  2695.                   (A : LongString; CS : CharSet; B : LongString);
  2696.              function ƒlsƒTrimTrailSetF
  2697.                   (A : LongString; CS : CharSet) : LongString;
  2698. .
  2699.         Purpose:
  2700.              Returns a LongString with trailing characters in CS
  2701.         stripped.
  2702. .
  2703.         Examples:
  2704.              See the file TESTLSTR.PAS
  2705. .
  2706.         Comments:
  2707.              CS contains an arbitrary set of characters.
  2708. .
  2709.         See also:
  2710.              lsTrimLeadSet  lsTrimSet
  2711.              lsTrim         lsTrimLead     lsTrimTrail
  2712.  
  2713. unit ƒShƒLngStr
  2714.         ƒlsUPCASE
  2715.         Declarations:
  2716.              procedure lsUpcase
  2717.                   (A, B: LongString);
  2718.              function ƒlsƒUpcaseF
  2719.                   (A: LongString): LongString;
  2720. .
  2721.         Purpose:
  2722.              Upcase the LongString in A, returning a new LongString.
  2723. .
  2724.         Examples:
  2725.              If             A contains "ABCdefGHIjkl"
  2726.              then           lsUpcase(A, B);
  2727.              results in     B containing "ABCDEFGHIJKL"
  2728. .
  2729.         Comments:
  2730. .
  2731.         See Also:
  2732.              lsLocase
  2733.  
  2734. unit ƒShƒLngStr
  2735.         ƒlsWRITELN
  2736.         Declarations:
  2737.              procedure lsWriteLn
  2738.                   (var F: Text; A: LongString);
  2739. .
  2740.         Purpose:
  2741.              Write a LongString to a text file.
  2742. .
  2743.         Examples:
  2744.              lsWriteLn(MyFile, A);
  2745. .
  2746.         Comments:
  2747.              If I/O checking is off lsIoResult MUST be called after each
  2748.         call to lsReadLn or lsWriteLn. If I/O checking is on, and if an
  2749.         I/O error occurs, the program will terminate with a run-time
  2750.         error. This action duplicates the action of the IoResult function
  2751.         for normal I/O.
  2752. .
  2753.         See Also:
  2754.              lsIoff    lsIon     lsIoResult     lsReadLn
  2755.  
  2756. unit ƒShƒUtilPk
  2757.              ƒDelimSetType = Set of Char;
  2758. .
  2759.              ƒDelimSet : DelimSetType = [#0..#32];
  2760.              The typed constant used by the GetNext routines to determine
  2761.         the end of a substring to be returned. It may be freely changed
  2762.         during program execution.
  2763.  
  2764. unit ƒShƒUtilPk
  2765.              ƒStartingMode : Integer;
  2766.              {Initial video mode of the system (Mono, CO80, BW40, ...)}
  2767. .
  2768.              ƒStartingAttr : Byte;
  2769.              {Initial video attribute of the system}
  2770.  
  2771. unit ƒShƒUtilPk
  2772.         ƒBETWS
  2773.         Declarations:
  2774.              function BetwS(Lower, Item, Upper  : LongInt) : boolean;
  2775. .
  2776.         Purpose:
  2777.              Performs a SIGNED test of the condition that
  2778. .
  2779.                               Lower <= Item <= Upper
  2780. .
  2781.         returning TRUE if and only if the condition is met.
  2782. .
  2783.         Comments:
  2784.              Lower, Item, and Upper can be any combination of 1, 2, and
  2785.         4-byte entities.
  2786. .
  2787.              Note that
  2788.                   BetwU($EA, $EA, $FA) = true
  2789.              whereas
  2790.                   BetwS($EA, $EA, $FA) = false
  2791. .
  2792.         Examples:
  2793.              See TESTBETW.PAS
  2794. .
  2795.         See also:
  2796.              BetwU
  2797.  
  2798. unit ƒShƒUtilPk
  2799.         ƒBETWU
  2800.         Declarations:
  2801.              function BetwU(Lower, Item, Upper  : LongInt) : boolean;
  2802. .
  2803.         Purpose:
  2804.              Performs an UNSIGNED test of the condition that
  2805. .
  2806.                               Lower <= Item <= Upper
  2807. .
  2808.         returning TRUE if and only if the condition is met.
  2809. .
  2810.         Comments:
  2811.              Lower, Item, and Upper can be any combination of 1, 2, and
  2812.         4-byte entities.
  2813. .
  2814.              Note that
  2815.                   BetwU($EA, $EA, $FA) = true
  2816.              whereas
  2817.                   BetwS($EA, $EA, $FA) = false
  2818. .
  2819.         Examples:
  2820.              See TESTBETW.PAS
  2821. .
  2822.         See also:
  2823.              BetwS
  2824.  
  2825. unit ƒShƒUtilPk
  2826.         ƒDELALL
  2827.         Declarations:
  2828.              procedure DelAll(S1, DS : String; S2);
  2829.              function ƒDelAllF(S1, DS : string) : string;
  2830. .
  2831.         Purpose:
  2832.              In string S1 delete all occurrences of DS.
  2833. .
  2834.         Comments:
  2835. .
  2836.         Examples:
  2837.              See the file TESTUTIL.PAS
  2838. .
  2839.         See also:
  2840.              RepAll
  2841.  
  2842. unit ƒShƒUtilPk
  2843.         ƒGETNEXT
  2844.         Declarations:
  2845.              procedure GetNext(var S1, S2 : String);
  2846.              function ƒGetNextF(var S1 : String) : String;
  2847. .
  2848.         Purpose:
  2849.              Returns the next leading substring of S1 which is delimited
  2850.         by a member of DelimSet.
  2851. .
  2852.         Comments:
  2853.              S1 is returned with the sub-string stripped off, but not
  2854.         trimmed. S2 or the function value is trimmed.
  2855. .
  2856.              If S1 is empty on entry, both S1 and S2 (or the function
  2857.         value) will be empty on return.
  2858. .
  2859.         Examples:
  2860.              See the file TESTUTIL.PAS
  2861. .
  2862.         See also:
  2863.  
  2864. unit ƒShƒUtilPk
  2865.         ƒHEX
  2866.         Declarations:
  2867.              function HEX(A : LongInt) : String;
  2868. .
  2869.         Purpose:
  2870.              Converts any INTEGER-type variable into a string
  2871.         correspnoding to the hex value.
  2872. .
  2873.         Comments:
  2874.              The parameter A may be of any Integer type (ShortInt, Byte,
  2875.         Integer, Word, or LongInt
  2876. .
  2877.              HEX will return either a 2, 4, or 8 character string,
  2878.         depending on whether the actual value of the parameter (rather
  2879.         than its type) is representable by a
  2880. .
  2881.                             1 byte value (ShortInt, Byte)
  2882.                             2 byte value (Integer, Word)
  2883.                             4 byte value (LongInt)
  2884. .
  2885.              Note that a negative value will always be returned as an 8
  2886.         character string.
  2887. .
  2888.         Examples:
  2889.              See the file TESTUTIL.PAS
  2890. .
  2891.         See also:
  2892.  
  2893. unit ƒShƒUtilPk
  2894.         ƒHIWORD
  2895.         Declarations:
  2896.              function HiWord(LI : LongInt) : Word;
  2897. .
  2898.         Purpose:
  2899.              Returns the high order word of a LongInt.
  2900. .
  2901.         Comments:
  2902.              This function is the analog of the system function HI, per-
  2903.         forming the analogous operation on a LongInt to that performed by
  2904.         HI on an INTEGER or WORD.
  2905. .
  2906.         Examples:
  2907.              See the file TESTUTIL.PAS
  2908. .
  2909.         See also:
  2910.              LoWord
  2911.  
  2912. unit ƒShƒUtilPk
  2913.         ƒLI
  2914.         Declarations:
  2915.              function LI(Ilo, Ihi : Word) : LongInt;
  2916. .
  2917.         Purpose:
  2918.              Converts two Word variables to a LongInt
  2919. .
  2920.         Comments:
  2921. .
  2922.         Examples:
  2923.              See the file TESTUTIL.PAS
  2924. .
  2925.         See also:
  2926.  
  2927. unit ƒShƒUtilPk
  2928.         ƒLOWORD
  2929.         Declarations:
  2930.              function LoWord(LI : LongInt) : Word;
  2931. .
  2932.         Purpose:
  2933.              Returns the low order word of a LongInt.
  2934. .
  2935.         Comments:
  2936.              This function is the analog of the system function LO, per-
  2937.         forming the analogous operation on a LongInt to that performed by
  2938.         LO on an INTEGER or WORD.
  2939. .
  2940.         Examples:
  2941.              See the file TESTUTIL.PAS
  2942. .
  2943.         See also:
  2944.              HiWord
  2945.  
  2946. unit ƒShƒUtilPk
  2947.         ƒPMOD
  2948.         Declarations:
  2949.              function Pmod(X, Modulus : LongInt) : LongInt;
  2950. .
  2951.         Purpose:
  2952.              Returns the remainder of X on division by MODULUS as a
  2953.         positive number, regardless of the sign of X.
  2954. .
  2955.         Comments:
  2956.              Recall that, e.g., -1 is congruent to (modulus-1). Thus, for
  2957.         example, Pmod(-2, 7) will return 5 as the function value.
  2958. .
  2959.         Examples:
  2960.              (-2 mod 5) = -2
  2961.              Pmod(-2, 5) = 3
  2962.              See the file TESTUTIL.PAS
  2963. .
  2964.         See also:
  2965.  
  2966. unit ƒShƒUtilPk
  2967.         ƒPOSSET
  2968.         Declarations:
  2969.              function PosSet(A : CharSet; S : string) : byte;
  2970. .
  2971.         Purpose:
  2972.              Returns the position of the first occurrence of any member
  2973.         of A in S.
  2974. .
  2975.         Comments:
  2976.              This function is intended primarily for internal use by
  2977.         ShUtilPk and ShCmdLin.
  2978. .
  2979.         Examples:
  2980.                   If   S = 'X1Y2C3Z4B'
  2981.                   and  A = ['A','B','C']
  2982.                   then PosSet(A, S) will return 5.
  2983.              See the file TESTUTIL.PAS
  2984. .
  2985.         See also:
  2986.  
  2987. unit ƒShƒUtilPk
  2988.         ƒREPALL
  2989.         Declarations:
  2990.              procedure RepAll(S1, FS, SS : String; var S2 : string);
  2991.              function ƒRepAllF(S1, FS, SS : string) : string;
  2992. .
  2993.         Purpose:
  2994.              In string S1 replace all occurrences of FS with SS
  2995. .
  2996.         Comments:
  2997. .
  2998.         Examples:
  2999.              See the file TESTUTIL.PAS
  3000. .
  3001.         See also:
  3002.              DelAll
  3003.  
  3004. unit ƒShƒUtilPk
  3005.         ƒSEARCHENVIRONMENT
  3006.         Declarations:
  3007.              function SearchEnvironment(Code : String) : String;
  3008. .
  3009.         Purpose:
  3010.              Searches the environment space for "CODE" and returns the
  3011.         corresponding string.
  3012. .
  3013.         Comments:
  3014.              If the CODE string has not been set with a SET statement,
  3015.         the function will return an empty string.
  3016. .
  3017.         Examples:
  3018.              If the DOS command
  3019.                                  SET GORP=FooBaz
  3020.         has been executed, then
  3021.                             SearchEnvironment('GORP')
  3022.         will return
  3023.                                      'FooBaz'
  3024. .
  3025.         See also:
  3026.  
  3027. unit ƒShƒUtilPk
  3028.         ƒSTARSTRING
  3029.         Declarations:
  3030.              function StarString(Pattern, Target : String) : Boolean;
  3031. .
  3032.         Purpose:
  3033.              This function performs a generalization of the wildcard
  3034.         string matching usually performed by DOS.
  3035. .
  3036.         Comments:
  3037.              The mask is presented in Pattern, and the string to be
  3038.         scanned is presented in Target. The function will return TRUE or
  3039.         FALSE as the target does or does not match the mask.
  3040. .
  3041.              A '*' wild card can be placed anywhere within the mask, and
  3042.         will represent its usual 'zero or more of any characters'. Scan-
  3043.         ning will not be terminated at that point, however, but will con-
  3044.         tinue. Thus, '*B*EFG' will match 'ABCDEFG', but '*B*EGF' will
  3045.         not. Similarly, '*ABC*' will match, but '*ABC' will not.
  3046. .
  3047.              A '?' wild card can also be placed anywhere within the mask,
  3048.         and will also represent its usual 'one occurrance of any char-
  3049.         acter'.
  3050. .
  3051.         Examples:
  3052.                   StarString('*B*EFG', 'ABCDEFG')
  3053.                                                             returns TRUE.
  3054. .
  3055.                   StarString('*B*EGF', 'ABCDEFG')
  3056.                                                             returns FALSE
  3057.                            but would return TRUE using the DOS algorithm.
  3058.              See the file TESTUTIL.PAS
  3059. .
  3060.         See also:
  3061.  
  3062. unit ƒShƒUtilPk
  3063.         ƒUNIQUEFILENAME
  3064.         Declarations:
  3065.              function UniqueFileName
  3066.                       (Path : String; AddExt : Boolean) : string;
  3067. .
  3068.         Purpose:
  3069.              Returns a file name which will be unique in the directory
  3070.         specified by PATH.
  3071. .
  3072.         Comments:
  3073.              On return, the file name will be appended to PATH to give a
  3074.         fully qualified path.
  3075. .
  3076.              If AddExt is TRUE, an extension of .$$$ will be appended,
  3077.         else only the file name will be returned. In either case, the
  3078.         returned entity is guaranteed to be unique.
  3079. .
  3080.         Examples:
  3081.              See the file TESTUTIL.PAS
  3082. .
  3083.         See also:
  3084.  
  3085. unit ƒShƒUtilPk
  3086.         ƒWHOAMI
  3087.         Declarations:
  3088.              function WhoAmI : String;
  3089. .
  3090.         Purpose:
  3091.              Returns the fully qualified path to the currently executing
  3092.         file.
  3093. .
  3094.         Comments:
  3095.              Can be used with DOS 3.x or above, ONLY.
  3096. .
  3097.         Examples:
  3098.              See the file TESTUTIL.PAS
  3099. .
  3100.         See also:
  3101.  
  3102.                ƒBetwS.............. 9-2
  3103.                ƒBetwU.............. 9-2
  3104.  
  3105.                ƒC2P................ 3-3
  3106.                ƒC2PF............... 3-3
  3107.                ƒCAbs............... 3-4
  3108.                ƒCAbsF.............. 3-4
  3109.                ƒCAdd............... 3-4
  3110.                ƒCAddF.............. 3-4
  3111.                ƒCConj.............. 3-5
  3112.                ƒCConjF............. 3-5
  3113.                ƒCDiv............... 3-5
  3114.                ƒCDivF.............. 3-5
  3115.                ƒCharSet............ 2-2
  3116.                ƒCheckOff........... 6-2
  3117.                ƒCheckOn............ 6-2
  3118.                ƒClClose............ 2-3
  3119.  
  3120.                ƒClInit............. 2-3
  3121.                ƒClParse............ 2-4
  3122.                ƒCmp2Str............ 3-6
  3123.                ƒCmplxError......... 3-6
  3124.                ƒCmpP2Str........... 3-7
  3125.                ƒCmpP2StrD.......... 3-7
  3126.                ƒCMul............... 3-8
  3127.                ƒCMulF.............. 3-8
  3128.                ƒColor Constants........
  3129.                              1-1 - 1-3
  3130.                ƒColorName.......... 1-5
  3131.                ƒComplex............ 3-3
  3132.                ƒComplexBaseType.... 3-3
  3133.                ƒComplexElement..... 3-3
  3134.  
  3135.                ƒCpPwrR............. 3-8
  3136.                ƒCpPwrRF............ 3-8
  3137.                ƒCrcCalc............ 4-2
  3138.                ƒCrcCopy............ 4-3
  3139.                ƒCSub............... 3-9
  3140.                ƒCSubF.............. 3-9
  3141.  
  3142.                ƒDayStr............. 5-2
  3143.                ƒDelAll............. 9-3
  3144.                ƒDelAllF............ 9-3
  3145.                ƒDelimSet........... 9-1
  3146.                ƒDelimSetType....... 9-1
  3147.                ƒdlƒAppend........... 7-4
  3148.                ƒdlƒCount............ 7-4
  3149.                ƒdlƒFree............. 7-5
  3150.                ƒdlƒGetCurrent....... 7-6
  3151.                ƒdlƒGetFirst......... 7-6
  3152.                ƒdlƒGetLast.......... 7-7
  3153.                ƒdlƒGetNext.......... 7-7
  3154.                ƒdlƒGetPrev.......... 7-8
  3155.                ƒdlƒLessFunc......... 7-3
  3156.  
  3157.                ƒdlƒList............. 7-3
  3158.                ƒdlƒListInit......... 7-9
  3159.                ƒdlƒNode............. 7-2
  3160.                ƒdlƒNodePtr.......... 7-2
  3161.                ƒdlƒPop............. 7-10
  3162.                ƒdlƒPush............ 7-11
  3163.                ƒdlƒPut............. 7-12
  3164.                ƒdlƒPutPrev......... 7-12
  3165.                ƒdlƒPutSorted....... 7-13
  3166.                ƒdlƒSpaceUsed....... 7-14
  3167.                ƒDoW................ 5-3
  3168.  
  3169.                ƒGetNext............ 9-4
  3170.                ƒGetNextF........... 9-4
  3171.                ƒGetSwitch.......... 2-6
  3172.                ƒGreg2ANSI.......... 5-3
  3173.                ƒGreg2JDate......... 5-4
  3174.                ƒGreg2JDN........... 5-4
  3175.                ƒGreg2Str........... 5-6
  3176.                ƒGregType........... 5-2
  3177.  
  3178.                ƒHaltMsg............ 6-3
  3179.                ƒHEX................ 9-4
  3180.                ƒHiWord............. 9-5
  3181.  
  3182.                ƒIm................. 3-3
  3183.                ƒIntVal............. 2-2
  3184.  
  3185.                ƒJDate2Greg......... 5-5
  3186.                ƒJDN2ANSI........... 5-5
  3187.                ƒJDN2Greg........... 5-6
  3188.                ƒJDN2Str............ 5-7
  3189.  
  3190.                ƒLI................. 9-6
  3191.                ƒLongString......... 8-3
  3192.                ƒLongStringType..... 8-3
  3193.                ƒLoWord............. 9-6
  3194.                ƒlsƒCenter........... 8-5
  3195.                ƒlsƒCenterCh......... 8-5
  3196.                ƒlsƒCenterChF........ 8-5
  3197.                ƒlsƒCenterF.......... 8-5
  3198.                ƒlsƒCharStr.......... 8-6
  3199.                ƒlsƒCharStrF......... 8-6
  3200.                ƒlsƒComp............. 8-7
  3201.                ƒlsƒCompType......... 8-3
  3202.                ƒlsƒConcat........... 8-7
  3203.                ƒlsƒConcatF.......... 8-7
  3204.  
  3205.                ƒlsƒConcatLs2Str..... 8-7
  3206.                ƒlsƒConcatLs2StrF.... 8-7
  3207.                ƒlsƒConcatStr2Ls..... 8-7
  3208.                ƒlsƒConcatStr2LsF.... 8-7
  3209.                ƒlsƒCopy............. 8-8
  3210.                ƒlsƒCopyF............ 8-8
  3211.                ƒlsƒCount............ 8-9
  3212.                ƒlsƒCountStr......... 8-9
  3213.                ƒlsƒCountStrUC....... 8-9
  3214.                ƒlsƒCountUC.......... 8-9
  3215.                ƒlsƒDelAll.......... 8-10
  3216.                ƒlsƒDelAllF......... 8-10
  3217.                ƒlsƒDelAllStr....... 8-10
  3218.                ƒlsƒDelAllStrF...... 8-10
  3219.  
  3220.                ƒlsƒDelAllStrUC..... 8-10
  3221.                ƒlsƒDelAllStrUCF.... 8-10
  3222.                ƒlsƒDelAllUC........ 8-10
  3223.                ƒlsƒDelAllUCF....... 8-11
  3224.                ƒlsƒDelete.......... 8-12
  3225.                ƒlsƒDeleteF......... 8-12
  3226.                ƒlsƒDelimSet......... 8-3
  3227.                ƒlsƒDelimSetType..... 8-3
  3228.                ƒlsƒDispose......... 8-12
  3229.                ƒlsƒGetNext......... 8-13
  3230.                ƒlsƒGetNextF........ 8-13
  3231.                ƒlsƒGetNextStr...... 8-13
  3232.                ƒlsƒGetNextStrF..... 8-13
  3233.                ƒlsƒInit............ 8-13
  3234.  
  3235.                ƒlsƒInsert.......... 8-17
  3236.                ƒlsƒInsertF......... 8-17
  3237.                ƒlsƒInsertStr....... 8-17
  3238.                ƒlsƒInsertStrF...... 8-17
  3239.                ƒlsƒIoff............ 8-14
  3240.                ƒlsƒIon............. 8-15
  3241.                ƒlsƒIoResult........ 8-16
  3242.                ƒlsƒLeftPad......... 8-18
  3243.                ƒlsƒLeftPadCh....... 8-19
  3244.                ƒlsƒLeftPadChF...... 8-19
  3245.                ƒlsƒLeftPadF........ 8-18
  3246.                ƒlsƒLength.......... 8-20
  3247.                ƒlsƒLocase.......... 8-20
  3248.                ƒlsƒLocaseF......... 8-20
  3249.  
  3250.                ƒlsƒLongString2Str.. 8-21
  3251.                ƒlsƒPad............. 8-21
  3252.                ƒlsƒPadCh........... 8-22
  3253.                ƒlsƒPadChF.......... 8-22
  3254.                ƒlsƒPadF............ 8-21
  3255.                ƒlsƒPos............. 8-22
  3256.                ƒlsƒPosSet.......... 8-23
  3257.                ƒlsƒPosStr.......... 8-22
  3258.                ƒlsƒPosStrUC........ 8-22
  3259.                ƒlsƒPosUC........... 8-22
  3260.                ƒlsƒReadLn.......... 8-24
  3261.                ƒlsƒRepAll.......... 8-24
  3262.                ƒlsƒRepAllF......... 8-24
  3263.                ƒlsƒRepAllStr....... 8-24
  3264.  
  3265.                ƒlsƒRepAllStrF...... 8-24
  3266.                ƒlsƒRepAllStrUC..... 8-24
  3267.                ƒlsƒRepAllStrUCF.... 8-24
  3268.                ƒlsƒRepAllUC........ 8-24
  3269.                ƒlsƒRepAllUCF....... 8-24
  3270.                ƒlsƒSizeOf.......... 8-25
  3271.                ƒlsƒStr2LongString.. 8-26
  3272.                ƒlsƒStr2LongStringF. 8-26
  3273.                ƒlsƒTransfer........ 8-27
  3274.                ƒlsƒTrim............ 8-28
  3275.                ƒlsƒTrimF........... 8-28
  3276.                ƒlsƒTrimLead........ 8-28
  3277.                ƒlsƒTrimLeadF....... 8-28
  3278.                ƒlsƒTrimLeadSet..... 8-29
  3279.  
  3280.                ƒlsƒTrimLeadSetF.... 8-29
  3281.                ƒlsƒTrimSet......... 8-30
  3282.                ƒlsƒTrimSetF........ 8-30
  3283.                ƒlsƒTrimTrail....... 8-29
  3284.                ƒlsƒTrimTrailF...... 8-29
  3285.                ƒlsƒTrimTrailSet.... 8-30
  3286.                ƒlsƒTrimTrailSetF... 8-30
  3287.                ƒlsƒUpcase.......... 8-31
  3288.                ƒlsƒUpcaseF......... 8-31
  3289.                ƒlsƒWriteLn......... 8-31
  3290.  
  3291.                ƒMaxLongString...... 8-4
  3292.                ƒMonthStr........... 5-2
  3293.  
  3294.                ƒNotFound........... 8-4
  3295.                ƒNow................ 5-7
  3296.                ƒNow2Time........... 5-7
  3297.                ƒNowStr............. 5-8
  3298.  
  3299.                ƒOrientation........ 1-3
  3300.  
  3301.                ƒP2C................ 3-9
  3302.                ƒP2CF............... 3-9
  3303.                ƒPmod............... 9-7
  3304.                ƒPopSwitch.......... 2-6
  3305.                ƒPosSet............. 9-7
  3306.  
  3307.                ƒRe................. 3-3
  3308.                ƒReadSwCh........... 2-7
  3309.                ƒRealVal............ 2-2
  3310.                ƒRepAll............. 9-8
  3311.                ƒRepAllF............ 9-8
  3312.                ƒRingSize........... 8-3
  3313.                ƒRunErrorMsg........ 6-3
  3314.                ƒRxC............... 3-10
  3315.                ƒRxCF.............. 3-10
  3316.  
  3317.                ƒSearchEnvironment.. 9-8
  3318.                ƒSelectColors....... 1-3
  3319.                ƒSetSwCh............ 2-8
  3320.                ƒslƒAppend........... 7-4
  3321.                ƒslƒCount............ 7-4
  3322.                ƒslƒFree............. 7-5
  3323.                ƒslƒGetCurrent....... 7-6
  3324.                ƒslƒGetFirst......... 7-6
  3325.                ƒslƒGetLast.......... 7-7
  3326.                ƒslƒGetNext.......... 7-7
  3327.                ƒslƒList............. 7-3
  3328.                ƒslƒListInit......... 7-9
  3329.                ƒslƒNode............. 7-2
  3330.                ƒslƒNodePtr.......... 7-2
  3331.  
  3332.                ƒslƒPop............. 7-10
  3333.                ƒslƒPush............ 7-11
  3334.                ƒslƒPut............. 7-12
  3335.                ƒslƒSpaceUsed....... 7-14
  3336.                ƒSSM2Time........... 5-8
  3337.                ƒSSM2TimeStr........ 5-9
  3338.                ƒStarString......... 9-9
  3339.                ƒStartingAttr....... 9-1
  3340.                ƒStartingMode....... 9-1
  3341.                ƒStrVal............. 2-2
  3342.                ƒSwRec.............. 2-2
  3343.                ƒSwVal.............. 2-2
  3344.  
  3345.                ƒTime2SSM........... 5-9
  3346.                ƒTime2TimeStr...... 5-10
  3347.                ƒTimeType........... 5-2
  3348.                ƒToday............. 5-10
  3349.                ƒToday2ANSI........ 5-11
  3350.                ƒToday2Greg........ 5-11
  3351.                ƒTodayStr.......... 5-12
  3352.  
  3353.                ƒUniqueFileName..... 9-9
  3354.  
  3355.                ƒValueType.......... 2-2
  3356.                ƒVtInt.............. 2-2
  3357.                ƒVtReal............. 2-2
  3358.                ƒVtStr.............. 2-2
  3359.  
  3360.                ƒWhoAmI............ 9-10
  3361.  
  3362.