home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / pascal / IOFUNC.ZIP / LIBLIST.DOC next >
Encoding:
Text File  |  1986-04-12  |  7.9 KB  |  148 lines

  1.   ╔════════════════════════════════════════════════════════════════════════╗
  2.   ║         PASCAL LIBRARY LIST       8/2/85      SCOTT WADE               ║
  3.   ╚═════════╦═══╦══════════════════════════════════════════════╦═══╦═══════╝
  4.             ║   ║         Pascal Library by Scott Wade         ║   ║
  5.             ║   ║           715 FM 1959      Apt 310           ║   ║
  6.             ║   ║           Houston, TX 77034                  ║   ║
  7.      ┌──────╨───╨──────────────────────────────────────────────╨───╨──────┐
  8.      │  This  group of routines is contributed to public domain,  and no  │
  9.      │  one can possibly get any commercial value out of them since they  │
  10.      │  must be used in other programs. I require that if these are used  │
  11.      │  as is in  any  program,  that this banner remain with the source  │
  12.      │  code of the program.  I would appreciate any comments or sugges-  │
  13.      │  tions on improvements, & am curious to hear how these are used.   │
  14.      │  You can leave a message for me on these BBS's:                    │
  15.      │          Ziggy's  821-1391         ScoreBoard  583-7848            │
  16.      │          TBL-COMM 661-9040         Test-Mode   660-9252            │
  17.      └────────────────────────────────────────────────────────────────────┘
  18.  
  19. LIBLIST.DOC is the most important part of this library: all LIBs and their
  20. var parameter requirements are defined in LIBLIST.DOC. This is the primary
  21. documentation of the LIBs, with only the explanations of how to use them, what
  22. will be passed to/from them, and unusual conditions to be alert for.
  23.  
  24. LIB files, have an extension of .LIB, may have more than one proc (should
  25.     have, even) and will be documented together on the system disk in the
  26.     file 'LIBLIST.DOC'. All vars passed to & from the LIB are set up in
  27.     agreement with the declarations found in GLOBALS.PAS  THERE WILL BE NO
  28.     parameters passed that are not declared in this file!!! Only by declaring
  29.     all at once is it possible to keep track of what proc needs what var.
  30.     Note that GLOBALS has only TYPE declarations, not VAR,CONST,etc.
  31.  
  32.     All procs in a LIB start with the same letter as the LIB.  All LIBs start
  33. with different letters, in reverse alphabetic order. This prevents any
  34. possibility of duplicate procnames. Variables are named by preference. NO LIB
  35. will reference ANY variable NOT declared in the Procedure declaration or
  36. internally! In other words, don't count on the caller to assume the LIB knows
  37. about a global variable not identified in the calling statement. This is a
  38. good idea with regular procs, also.
  39.  
  40. LIBLIST.DOC will contain the documentation on ALL LIBs, always.
  41.  
  42. HINTS : LIBS should not, where possible to avoid it, actually output to the
  43. CRT or LST. Instead, pass output back to the caller and allow the caller to
  44. decide what to do with the output. This is because the caller may have:
  45. >Special screen format set up that requires some preprocessing, such as
  46. hyphenating or breaking the line at a space, or the printer may be set up
  47. for 132 or 80 or 120 or 66 chars/line, etc.
  48. >File output, such as a job log, may be desired instead of crt or lst output.
  49. >May only desire part of the actual output line.
  50.        For additional documentation, see the individual LIB.
  51.  
  52. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  53. zKeys.LIB      v1.0    8/2/85
  54.    This will accept any type of keyboard input, and return an Integer or Real,
  55. depending on what you want. Note that this lib is NOT set up to use yPrnt.LIB.
  56. ■  v1.1  9/27/85 procedure zString was deleted from the LIB.
  57.  
  58. ■  zStripBlanks( var Blankit : Buffer );
  59.    This strips the leading blanks off of Blankit.
  60. ■  zGetKey;
  61.    prompts for a keypress and waits until a key is pressed.
  62. ■  zInt(var KeyInt : integer ; PromptLin : Buffer );
  63.    Promptlin is the line to print before reading from keyboard. Promptlin will
  64.    be repeated until an integer is input. KeyInt is the integer that is
  65.    returned to the caller.
  66. ■  zReal(var KeyReal : Real ; PromptLin : Buffer );
  67.    Promptlin is the line to print before reading from keyboard. Promptlin will
  68.    be repeated until a real is input. KeyReal is the real that is returned to
  69.    the caller.
  70.  
  71. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  72. yPrnt.LIB      v1.0   11/12/85
  73.    This will print on CON, breaking lines at spaces, putting next output line
  74. after previous lines. Any line ending with ^ will cause a return/linefeed. To
  75. do a blank linefeed, set output line := '^'.
  76. ■ v1.1: 12/13/85 : yCaps added.
  77. ■ v1.2:  2/20/86 : yPrntI added.
  78.  
  79. ■  yPrnt( var wX : Integer; var OutLin : Buffer );
  80.    This works independantly of cursor position on screen, but will be messed up
  81.    if any other part of your program outputs to the screen without setting
  82.    wX := WhereX. OutLin is returned null.
  83. ■  yCaps( var wX : Integer; var OutLin : Buffer );
  84.    This will capitalize the first letter, add a period, then call yPrnt with
  85.    the sentence. If OutLin ends in ^, this will insert the . right before it,
  86.    so the RET is unaffected.  Works like a champ.
  87. ■  yPrntI( var wX : Integer; Just, OutInt : Integer );
  88.    This will yPrnt the specified Integer number OutInt in a field justified to
  89.    Just number of spaces. Remember that yPrnt will also add 1 space before this
  90.    when the number is printed.
  91.  
  92. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  93. xCommand.LIB    v1.0    8/2/85
  94.    This returns the parameters entered with the name of the command file. This
  95. allows .COM files to access the start command line.
  96. ■  v2.3  9/27/85 Some cleanup work done.
  97.  
  98. ■  xCommand(var Parms : buffer )
  99.    This returns the command line, w/out the name of the COM file. The line is
  100.    intact, unparsed. This should be the 1st proc used in the program or parts
  101.    of the command line may be corrupted.
  102.    Or so I'm told...I haven't had any problems yet.
  103. ■  xCmdParse( CmdParm : buffer ; var CmdList : LongWordList ;
  104.               var TotalParms : Integer ;)
  105.    This returns the command line, separated at the commas. Parameters entered
  106.    are in CmdList, and TotalParms is how many were entered.
  107.  
  108. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  109. wTime.LIB       v1.2   8/00/85
  110.    MS-Dos Current Time and Date library.
  111. ■  v1.1  9/27/85 The '19' is chopped from year to allow the date to fit into
  112.    global type word : string[ 10 ]
  113. ■  v1.2  10/17/85 procedure wMONTH added to allow other routines to convert
  114.    integers 1-12 to months. wTime calls wMonth.
  115.  
  116. ■  wMonth( mnth : integer ; var Date : word );
  117.    converts the integer mnth to a 3 letter string for the month, for example,
  118.    if Mnth = 3 then DATE will be returned as MAR.  Integers out of range are
  119.    returned as ERR.
  120. ■  wTime( var Time, Date : Word);
  121.    Returns time and Date as HH:MM:SS and MON/DD/YY, where all are
  122.    integers except MON, which is a 3-letter string.
  123.  
  124. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  125. vIOErr.LIB      v1.0    8/8/85
  126.    This will return a message for errors in file/device IO.
  127. ■  v1.1  12/7/85 Put remark statements in the right place & added to msg 02.
  128. ■  v1.2   4/ 6/86 : Function vTrueIfErr added.
  129.  
  130. ■  vIOerr( var IOErrMsg : Buffer ;var IOErrVal : Integer ;
  131.            var IOErr    : Boolean );
  132.    IOErrMsg will be the message returned after the IO is tried, IOErrVal will
  133.    be the value of IOResult and IOErr will be True. If no Error is encountered,
  134.    IOErrMsg will be unchanged,  IOErr will be False  and IOErrVal will be 0.
  135. ■  F vTrueIfErr( IOErrVal: integer; IOErrMsg : Buffer ): Boolean ;
  136.    This will print the errmsg, if there is one, and returns True if IOErrVal
  137.    is non-zero.  This uses writeln, not yPrnt, so yPrnt programs must take this
  138.    into account.
  139.  
  140. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  141. tOption.Lib    v1.0   4/11/86  Command option parser.
  142. ■  v1.0:  4/11/86 : original
  143.  
  144. ■  tOption( var BufLine : Buffer ; var AscInt : Integer );
  145.    This will extract a one-letter option that is preceded by /. For example:
  146.         JOBRUN /f filename.ext
  147.    will return 70, the ascii equivalent of 'F', and the buffer will be
  148.    ' filename.ext' NOTE: it converts to uppercase!