home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / dblib201.zip / README.TXT < prev    next >
Text File  |  1993-04-27  |  92KB  |  1,649 lines

  1. ===============================================================================
  2.                                 README.TXT
  3.                     For the dUFLP LIBRARY Files (attached)
  4.                (dUFLP = dBASE User's Function Library Project)
  5.                                Version 2.01
  6.                                 04/27/1993
  7. ===============================================================================
  8. This library system is freeware (no charge). This file (README.TXT) is a small 
  9. amount of description for the attached procedure file. I have spent many hours 
  10. compiling functions and procedures that I have found useful. Some of these (a 
  11. few) are ones I have written myself, many are ones I have incorporated here
  12. from a variety of sources, usually the Borland (once Ashton-Tate) Bulletin
  13. Board (BORBBS). There were a lot of good people using this board, both as 
  14. sysops/sigops, and as users, and I have learned alot about dBASE IV Programming 
  15. from these people. 
  16.  
  17. This is my attempt at returning the favor. 
  18.  
  19. All procedures/functions in PROC and accompanying files are public domain. 
  20. I ask that if you use them (or in this PROC file) with your systems,
  21. that you include ALL the documentation, including (ESPECIALLY) the name of 
  22. the programmer (Credit should go where it's due, after all). 
  23.  
  24. SPECIAL THANKS: To Jay Parsons (CIS: 70160,340), who has done 1) a LOT of the 
  25. routines you will find here, and 2) a lot of work with me to ensure that
  26. there is integrity and consistency in this system.
  27.  
  28. This is a set of dynamic files -- they're always changing. Please feel free to 
  29. send me comments and/or suggestions on ways to better it (which includes both 
  30. functions and procedures, and suggestions to make the ones here better). I can 
  31. be reached on Electronic Services: 
  32.  
  33. USSBBS: KenMayer 
  34.   (USSBBS -- Unofficial Software Support BBS -- run by the former SYSOP of 
  35.    the now defunct BORBBS, Roger Wedgehoft, can be accessed at: (408) 464-0350)  
  36. CompuServe: 71333,1030
  37.  
  38. or at home at:
  39.  
  40.    Ken Mayer
  41.    2308 Alva Avenue
  42.    El Cerrito, CA 94530
  43.    (510) 215-5879 (Home)
  44.  
  45. ==========
  46. DISCLAIMER
  47. ==========
  48. No guarantees are given. Last attempted, all these routines worked. I take no
  49. responsibility for their use, particularly if something happens to your data.
  50.  
  51. ========
  52. PROBLEMS
  53. ========
  54. Problems with individual procedures and functions should be addressed, if 
  55. possible, to the author (note the 'Programmer' listed in the first line of
  56. the internal documentation for each routine). If you cannot reach them, contact
  57. me at my id on CompuServe, USSBBS, or write/call me, and I will see what I can 
  58. do.
  59.  
  60. ============
  61. INSTRUCTIONS
  62. ============
  63. ---------------------------------------------
  64. dBASE IV, version 1.5 and later version users
  65. ---------------------------------------------
  66. In order to use these, you need to understand (and this is brief) how dBASE IV,
  67. version 1.5 (and later) uses functions and libraries. Basically, it follows a 
  68. 'search path' based on your programs and files, as well as its own internal 
  69. functions. dBASE starts at the top of the following list, and if it cannot 
  70. find the  function or procedure named in your program, it goes to the next 
  71. item in the list until it either finds it, or doesn't find it, as the case 
  72. may be. If not, you will get the dBASE error message about not finding a 
  73. function.
  74.  
  75. 1)  dBASE INTERNAL FUNCTIONS AND COMMANDS
  76. 2)  SYSPROC = "System Procedure Filename" (set in CONFIG.DB)
  77. 3)  Current Program (the one executing at that time)
  78. 4)  SET PROCEDURE TO <proc name>
  79. 5)  Calling Program (a main menu program, for example)
  80. 6)  SET LIBRARY TO <library name>
  81.  
  82. To use these files in dBASE IV, version 1.5 (and later), you should something 
  83. along the following lines as a layout: 
  84.  
  85.    For any procedures/functions that are required specifically for your
  86.    system, and no other, place those in your own procedure file, and
  87.    refer to that in the SYSPROC command in your CONFIG.DB file. Example:
  88.  
  89.    SYSPROC = MYPROC
  90.  
  91.    To use the 'standard' library file for this system, in your main program 
  92.    (by 'main program' we could be discussing a MENU program, or other front-
  93.    end program) put the command:
  94.  
  95.    SET PROCEDURE TO PROC  && or point to the appropriate directory
  96.    
  97.    And in the appropriate programs, or where needed,
  98.  
  99.    SET LIBRARY TO <library file> && based on those below
  100.  
  101. This is just one method of handling this. One thing that can make life easier,
  102. if you switch LIBRARY files a lot, is the dBASE IV, 1.5 (and later) option to 
  103. the SET function:  SET("LIBRARY"). This can be used in the following manner:
  104.  
  105.     cLibrary = set("LIBRARY")  && save current library name
  106.     set library to NEWLIB      && set new one
  107.     *-- do function/procedure calls from new library
  108.     set library to &cLibrary.  && return to previous library file
  109.  
  110.      OR you could use the new function SwitchLib():
  111.  
  112.     cOldLib = switchlib("FILES")
  113.     *-- execute function/procedure
  114.     cOldLib = switchlib(cOldLib)
  115.  
  116. SUGGESTION: If you store your copy of the LIBRARY files (and PROC) in another
  117. directory on the drive, you might want to define a public memvar called
  118. something like:  c_LibPath and store the path in in. This way you can
  119. use that with your routines to call the libraries. Something along the following
  120. could be useful:
  121.  
  122. PUBLIC c_LibPath
  123. Store "C:\DBFILES\PROC\" to c_LibPath
  124.   *-- processing
  125. cOldLib = SwitchLib("&c_LibPath.FILES")  && send with path, as well as filename
  126. *-- execute function/procedure
  127. cOldLib = SwitchLib(cOldLib)             && should return path
  128.  
  129. This will make it easier to update if you are setting this up for a client --
  130. you can change the c_LibPath variable in the setup or menu program ONCE, and
  131. not have to worry about it again.
  132.  
  133. NOTE: that in some of the library files there are functions which require 
  134. the use of functions in OTHER files (i.e., some functions in NAVIGATE use 
  135. some functions that are in TRIG). I have attempted to ensure that I have copied
  136. INTO those library files the appropriate functions, so you don't spend too much
  137. time tearing your hair out.
  138.  
  139. -------------------
  140. dBASE IV, 1.1 Users
  141. -------------------
  142. To use these procedure files in their entirety, use the DOS Copy command to 
  143. concatenate the library files to the PROC file. Something along the following
  144. lines (although you should check to make sure you have all the files):
  145.  
  146. COPY PROC.PRG+SCREEN.PRG+COLOR.PRG+TRIG.PRG+CONVERT.PRG+ <etc.>
  147.  
  148. You should note that in some of the library files, there are duplicated 
  149. functions used, due to the fact that some users in 1.5 (and later) might wish 
  150. to only use one or two of the library files. You can also use just the 
  151. individual library files in your SET PROCEDURE command, if you wish. 
  152.  
  153. Add to your programs (a menu or startup routine is one of the best places) 
  154. the line:
  155.  
  156. SET PROCEDURE TO PROC
  157.  
  158. To use individual routines, rather than the whole library, extract them using 
  159. your favorite ASCII editor, or remove the routines from this file (you might 
  160. want to copy it first) that you do not feel you will need.
  161.  
  162. ================================================================================
  163. WHAT'S HERE?
  164. ================================================================================
  165.  
  166. Some of the places routines are placed may seem a bit arbitrary -- they are. 
  167. These decisions were made based on the functions/procedures I use the most in 
  168. my own routines. Since the original purpose of this library was my own use, 
  169. I felt it my prerogative to be the one to make the final decision as to what 
  170. routines were left in PROC.PRG, and which got moved to the LIBRARY files. 
  171.  
  172. Included in this LIBRARY System are the following files:
  173.  
  174. Text Files
  175. README.TXT   -- You're looking at it.
  176. WHATS.NEW    -- This is a description of the new features for this system.
  177. CONTRIB.TXT  -- How to contribute to the Library Project.
  178. JPMOUSE.TXT  -- An explanation from Jay on the JPMOUSE.BIN file, attached
  179.                 (with his permission). See also the function ISMOUSE() and
  180.                 procedure file SETMOUSE in PROC.PRG.
  181. DISK.TXT     -- A very brief discussion on the use of DISK.BIN.
  182. SEARCH.TXT   -- A very brief discussion on the use of SEARCH.BIN.
  183. USERID.TXT   -- A very brief discussion on the use of USERID.BIN.
  184. PRINTSCR.TXT -- Discussion on the use of PRINTSCR.BIN.
  185. SCREEN.TXT   -- Discussion on the use of SCREEN.BIN.
  186. VDCURSOR.TXT -- A very brief discussion on the use of VDCURSOR.BIN.
  187. MUSCLICK.TXT -- Discussion on the use of MUSCLICK.BIN from the .ASM file.
  188. DHUNG2.TXT   -- A copy of the Hungarian Notation for dBASE by di Falco,
  189.                 modified for the dBASE User's Function Library Project.
  190. SHANA.TXT    -- A description of the hows and whys for the Hebrew Date
  191.                 routines in DATES.PRG.
  192. VOLNUM.TXT   -- A description on the use of VOLNUM.BIN.
  193.  
  194. Procedure and Library Files -- Described Below
  195. ARRAY.PRG
  196. COLOR.PRG
  197. CONVERT.PRG
  198. DATES.PRG
  199. ERRLOG.PRG
  200. FIELDS.PRG
  201. FILES.PRG
  202. FINANCE.PRG
  203. FRPG.PRG
  204. HELPROC.PRG
  205. LISTFILE.PRG
  206. MEASURE.PRG
  207. MISC.PRG
  208. NAVIGATE.PRG
  209. OBSOLETE.PRG
  210. PICKLIST.PRG
  211. PROC.PRG
  212. SCA.PRG
  213. SCREEN.PRG
  214. STATS.PRG
  215. STRINGS.PRG
  216. TIME.PRG
  217. TRIG.PRG
  218. WINDOWS.PRG
  219.  
  220. BIN Files -- used in routines attached (see text files above).
  221. DISK.BIN
  222. JPMOUSE.BIN
  223. MUSCLICK.BIN
  224. PRINTSCR.BIN
  225. SCREEN.BIN
  226. SEARCH.BIN
  227. USERID.BIN
  228. OX.SYS
  229. VDCURSOR.BIN
  230. VOLNUM.BIN
  231.  
  232. DBF Files -- used in routines attached.
  233. HELPER.DBF
  234.  
  235. OTHER Files -- used in routines attached.
  236. HELPER.FMT
  237. HELPER.FMO
  238.  
  239. Below is a quick list of all the procedures and functions included in the 
  240. library files in the sequence they are presented in the programs themselves:
  241.  
  242. ==============================================================================
  243. PROC.PRG -- The MAIN PROCEDURE File
  244. ==============================================================================
  245.  
  246. ----------------------------------
  247. MESSAGE/SCREEN PROCESSING ROUTINES
  248. ----------------------------------
  249. PrintErr    -- used to display a "standard" error message for printer 
  250.                errors (is it on, online, out of paper?).
  251.                Usage: do PrintErr
  252. Open_Screen -- Used to add texture to the background for an opening screen or
  253.                menu.
  254.                Usage: do Open_Screen
  255. JazClear    -- performs a nice center to edge of screen clear (using a box) ...
  256.                Usage: do JazClear
  257. Wipe        -- performs a left-to-right wipe of a window. Nice effect.
  258.                Usage: do Wipe with <nULRow>,<nULCol>,<nBRRow>,<nBRCol>
  259. Center      -- used to center text anywhere on the screen (optional colors).
  260.                Usage: do Center with <nRow>,<nWidth>,"<cColors>","<cText>"
  261. Surround()  -- Used to display text at X,Y position, surrounded with a double-
  262.                line box.
  263.                Usage: Surround(<nRow>,<nCol>,"<cColor>","<cText>")
  264. Message1()  -- Displays a single-line message, waits for user to press a key
  265.                before program moves on.
  266.                Usage: Message1(<nRow>,<nWidth>,"<cColor>","<cText>")
  267. Message2()  -- Same as above, but displays message in a window (with shadow).
  268.                Usage: Message2("<cText>","<cColor>")
  269. Message3()  -- Same as above, but will handle LONG messages, wrapping inside
  270.                window.
  271.                Usage: Message3("<cText>","<cColor>")
  272. Message4()  -- 2-Line message in a window, pauses for user.
  273.                Usage: Message4("<cText1>","<cText2>","<cColor>")
  274. ProgBar     -- Monitor program activity, so user does not get worried that
  275.                the machine went into limbo. A graphic version of what the
  276.                "MONITOR" procedure in PROC.PRG does.
  277.                Usage: Do ProgBar with <nQuan>,"<cWindCol>","<cFillCol1>",;
  278.                                  "<cFillCol2>","<cMessage>",<nWindWidth>
  279. ScrnHead()  -- Used to display a screen header inside a box (with a shadow).
  280.                Usage: ScrnHead("<cColor>","<cText>")
  281. YesNo()     -- Used to ask a "yes/no" type question, allows three lines of 
  282.                message, and uses menu pads to choose (move cursor, press 
  283.                <enter>).
  284.                Usage: YesNo(<lAnswer>,"<cMess1>","<cMess2>","<cMess3>",;
  285.                              "<cColors>")
  286. YesNo2()    -- As above, but allows programmer to choose position on screen.
  287.                Usage: YesNo2(<lAnswer>,"<cWhere>","<cMess1>","<cMess2>",;
  288.                            "<cMess3>","<cColors>")
  289.                    where cWhere may be one of the following:
  290.                          UL = Upper Left
  291.                          UC = Upper Center
  292.                          UR = Upper Right
  293.                          CL = Center Left
  294.                          CC = Center Center
  295.                          CR = Center Right
  296.                          BL = Bottom Left
  297.                          BC = Bottom Center
  298.                          BR = Bottom Right
  299.                    Anything else will default to CC.
  300. ErrorMsg()  -- Allows 2 lines of message, first is ** ERROR **, or optionally,
  301.                ** ERROR # **  where '#' is a number (if "<cErr>" is empty,
  302.                (""), system uses first option, but there must be SOMETHING
  303.                there). 
  304.                Usage: ErrorMsg(<cErr>,<cMess1>,<cMess2>,<cColors>)
  305. Alert2()    -- Brings up an "Alert" dialog box (similar to Windows).
  306.                Usage: Alert2("<cTitle>","<cMessage>","<cColor>"[,"<cBorder>"])
  307. Shadow      -- Used for windows/boxes to display a shadow, giving 3-D effect.
  308.                Usage: do Shadow with <nULRow>,<nULCol>,<nBRRow>,<nBRCol>
  309. VPick()     -- Multiple-item Picklist -- this routine will allow you to create
  310.                a simple vertical picklist of items, returning the first letter 
  311.                of the option selected, or a null string if the user pressed 
  312.                <Esc>.
  313.                Usage: VPick(<nRow>,<nCol>,"<~Option1~Option2~Option3>",;
  314.                              "<cTitle>","<cMessage>",<lShadow>,<cColor>)
  315. HPick()     -- Very much like VPICK() above, but does a Horizontal Picklist.
  316.                Usage: HPick(<nRow>,<nCol>,"<~Option1~Option2~Option3>",;
  317.                              "<cTitle>","<cMessage>",<lShadow>,<cColor>)
  318. YesNo4()    -- Based on YesNo2() above, gives 3-D effect.
  319.                Usage: YesNo4(<lAnswer>,"<cWhere>","<cMess1>","<cMess2>",;
  320.                            "<cMess3>","<cColors>"[,<nStyle>])
  321. Alert4()    -- An Alert box. Gives same 3-D effect as above.           
  322.                Usage: Alert4(<cTitle>,<cMessage>,<cColors>[,<nStyle>])
  323. YesNo5()    -- Based on YesNo3() in WINDOWS.PRG, will wrap a long message
  324.                inside the dialog box. Gives same 3-D effect as above.
  325.                Usage: YesNo5(<lAnswer>,<cTitle>,<cMessage>,;
  326.            <cColor>[,<nStyle>])
  327. ErrorMsg2() -- Based on ErrorMsg(), gives 3-D effects (as above).
  328.                Usage: ErrorMsg(<cError#>,<cMess1>,<cMess2>,<cColor>;
  329.                   [,<nStyle>])
  330. ScrnHead2() -- Based on ScrnHead() above, uses 3-D effects. NOTE: Adds
  331.                one row to used area of screen (start screens at row 6,
  332.            not row 5). 
  333.            Usage: ScrnHead2(<cColor>,<cText>[,<nStyle>])
  334. Surround2() -- Based on Surround() above, centers text at row automatically,
  335.                and gives 3-D effects. Adds shadow as well. 
  336.            Usage: Surround2(<nRow>,<cColor>,<cText>[,<nStyle>])
  337. Bord3D      -- Creates 3-D border in a window with no "border" (i.e., border
  338.                NONE). (Used in above three routines) (Styles: 1 = raised,
  339.            2 = inset)
  340.                Usage: Do Bord3D with <nHeight>,<nWidth>,<cColor>,<nStyle>
  341. Bord3D2     -- Creates 3-D border in an area on screen created with FILL
  342.                commands. Used in 3-D scrnhead2() and others.
  343.            Usage: Do Bord3D2 with <nTop>,<nLeft>,<nBottom>,<nRight>,;
  344.                                   <cColor>,<nStyle>
  345. WordWrap()  -- Routine copied here from STRINGS.PRG for use with YesNo5().
  346. BackColor() -- Same, from COLOR.PRG for use with all 3-d Dialog/screen 
  347.                routines.
  348.  
  349. -------------------------
  350. COLOR PROCESSING ROUTINES
  351. -------------------------
  352. SetColor    -- Sets colors to contents of a memvar to handle various parts of
  353.                the screen. THIS IS A NEW ROUTINE -- USERS OF THE OLD 
  354.                SETCOLOR and SETCOLOR2 ROUTINES SHOULD CHECK "OBSOLETE.PRG".
  355.                Usage: do SetColor with <cColorVar>
  356. ReColor     -- Restores colors to those held in a string of the form returned
  357.                by SET("ATTRIBUTE").
  358.                Usage: Do ReColor with <cColors>
  359. ColorBrk()  -- Returns one of three portions of a color variable as used in
  360.                many of my own routines (YESNO, etc.). Used for explicitly
  361.                setting colors.
  362.                Usage: ColorBrk(<cColorVar>,<nField>)
  363. FBClrBrk()  -- Returns either the foreground or the background (FB) of a
  364.                color memory variable or string.
  365.                Usage: FBClrBrk(<cType>,<cColorVar>)
  366.  
  367. ----------------------------
  368. STRING MANIPULATION ROUTINES
  369. ----------------------------
  370. AllTrim()   -- Trims both sides of a character field/memvar.
  371.                Usage: AllTrim(<cString>)
  372. Justify()   -- This is moved here for use in other routines from STRINGS.PRG.
  373. State()     -- This is used for validation of a STATE (two letter) code ... 
  374.                (returns .t. or .f.) -- useful for data entry.
  375.                Usage: State(<cState>)
  376.  
  377. ----------------------
  378. DATE HANDLING ROUTINES
  379. ----------------------
  380. DateText()  -- Convert date to Month Day, Year format.
  381.                Usage: DateText(<dDate>)
  382. DateText2() -- As above, adds day of week (DoW, Month Day, Year).
  383.                Usage: DateText2(<dDate>)
  384. Age()       -- Returns the age of someone as of DATE(), given their birthdate.
  385.                Usage: Age(<dDate>)
  386.  
  387. --------------
  388. MISC. ROUTINES
  389. --------------
  390. SetPrint    -- Used to setup the printer memory variables for a print job.
  391.                Usage: do SetPrint
  392. DosRun()    -- Used to execute a DOS command/program from inside dBASE, handles
  393.                windows and such by restoring them when done.
  394.                Usage: DosRun(<cCmd>)
  395. ScrnRpt()   -- Shows a dBASE Report on screen, and pauses when the screen is
  396.                full.
  397.                Usage: ScrnRpt(<cRpt>)
  398. SetMouse    -- NEWNEWNEWNEW -- Version 2.0 specific. Used to toggle mouse on/off
  399.                handy with ON KEY definition. Requires public memvar c_Mouse.
  400.                Usage: Do SetMouse
  401. SwitchLib() -- Changes the current library file to another. Useful when doing
  402.                quick changes to execute a function/file in another library.
  403.                Usage: SwitchLib(<cNewLib>)
  404. VerLevel()  -- Used to return numeric value of current version of dBASE or
  405.                RUNTIME. Useful with those version specific routines.
  406.                Usage: VerLevel()
  407.  
  408. ==============================================================================
  409. LIBRARY FILES
  410. ==============================================================================
  411.  
  412. The following files are the 'library' files that contain all routines in this
  413. system not contained in PROC.PRG. See the section of this document marked
  414. 'INSTRUCTIONS' for how to use these. Please notice that some functions which
  415. are used in specific LIBRARY files (such as NAVIGATE.PRG, which uses some of
  416. the functions in TRIG.PRG) are duplicated in some of the other library files.
  417. This was done to make life easier on the programmer. Since dBASE IV, 1.5 (and 
  418. later) does not allow multiple library files (although one can hope for such 
  419. a feature in future editions), we are stuck having to duplicate some routines.
  420.  
  421. --------------------------------------------------------------------------------
  422. SCREEN.PRG -- Screen Handling
  423. --------------------------------------------------------------------------------
  424. Radio()     -- This routine creates a "radio-button" routine. You can have
  425.                up to four options. Returns # of item chosen ...
  426.                Usage: Radio(<nULRow>,<nULCol>,<nChoice>,"<cTxt1>","<cTxt2>",;
  427.                              "<cTxt3>","<cTxt4>","<cTitle>","<cColor>")
  428. CheckBox    -- This routine does a "CheckBox" much like Windows/Mac type
  429.                software, with up to four options. NOTE -- the items marked
  430.                in the format must be a) logical, and b) fields/memvars.
  431.                Usage: Do CheckBox with <nULRow>,<nULCol>,<cTitle>,<cColor>,;
  432.                                    <lChk1>,<cTxt1>[,<lChk2>,<cTxt2>];
  433.                                        [,<lChk3>,<cTxt3>] ... to 9
  434. MenuPad()   -- Used to define menu pad and popup bars as a specific length.
  435.                Function will truncate if longer than needed, and will
  436.                pad with spaces otherwise.
  437.                Usage: MenuPad("<nChoice>",<nLength>)
  438. Banner()    -- Used to display a scrolling "banner" message on the screen.
  439.                Usage: Banner(<nRow>,<nCol>,<nwidth>,"<cMessage>","<cColor>")
  440. SeeMatch()  -- Displays instant lookup match on a field in a shadowed box.
  441.                Usage: SeeMatch("<cFile>",<cSeekExp>,"<cReturn>",<nULRow>,;
  442.                                <nULCol>,<nBRRow>,<nBRCol>,"<cColor>")
  443. MsgExp()    -- Used to display a message (or an error message), centered on
  444.                the screen. Does not use the "(Press Space)" bits that dBASE
  445.                uses on an error message ... The message and the line on which
  446.                it is displayed will be the same color.
  447.                Usage: MsgExp("<cExp>")
  448. Dialog()    -- Routine to provide a 'standard' set of dialog boxes and buttons
  449.                for all applications. 
  450.                Usage: Dialog("<cMsg>",<nType>,"<cBorder>",<nDefBut>,<lShadow>,;
  451.                              "<cWind>","<cButton>")
  452.                nType is used to describe the dialog box type, options are:
  453.                0:      'OK'
  454.                1: 'OK' 'CANCEL'
  455.                2: 'ABORT'  'RETRY'  'IGNORE'
  456.                3: 'YES'  'NO'   'CANCEL'
  457.                4: 'YES'  'NO'
  458.                5: 'RETRY'   'CANCEL'
  459. YesNoCan()  -- A dialog box, defaults to 'Yes/No/Cancel', varies in size,
  460.                depending on programmer needs, optional row position. Nice
  461.                modification of the YESNO() function in PROC.PRG.
  462.                Usage: YesNoCan("<cAnswer>","<cMess1>","<cMess2>","<cMess3>",;
  463.                                "<cPrompt1>","<cPrompt2>","<cPrompt3>",;
  464.                                <nTopRow>,"<cColor>"[,<lConfirm>])
  465. ProgBar2    -- Same as PROGBAR in PROC.PRG, but a bit simpler to use.
  466.                Usage: Do ProgBar2 with <nQuan>,"<cWindCol>","<cFillCol2>",;
  467.                                  "<cFillCol2>"
  468. MovePad     -- Moves menu pad on selection of a letter. 
  469.                Usage: Do MenuPad with <cLetter>,<lSelect>,<cChoices>
  470. Monitor     -- Displays a box, showing total records in database -- is designed
  471.                to be used in a system that does a record-by-record update, 
  472.                so the user knows something is happening. You need to add code
  473.                to display actual record numbers as the task is happening.
  474.                Usage: do Monitor with "<cText>","<cColors>"
  475. Monitoroff  -- Cleanup for Monitor procedure above.
  476.                Usage: do MonitorOff
  477. NewBorder() -- This can be used to change your current border setting to
  478.                one of a set of pre-defined borders. It will also set a
  479.                public memvar c_Border to the same border setup string, and
  480.                returns the 'current' border string.
  481.                Usage: NewBorder("<cStyle>")
  482. VidRow()    -- Returns the absolute row coordinate on a screen, ignoring
  483.                active windows (which can be frustrating at times).
  484.                REQUIRES: VDCURSOR.BIN
  485.                Usage: VidRow()
  486. VidCol()    -- Returns the absolute column coordinate on a screen, ignoring
  487.                active windows ...
  488.                REQUIRES: VDCURSOR.BIN
  489.                Usage: VidCol()
  490. PwdMask()   -- Used to obtain a password from a user, with a programmer 
  491.                defineable mask character (default is asterisk). REQUIRES 
  492.                VDCURSOR.BIN
  493.                Usage: PwdMask(<cField>[,<nMaskChar>])
  494. MultiPick   -- Used for a checkbox routine, using a two-column array.
  495.                REQUIRES: JPMOUSE.BIN,MUSCLICK.BIN,VDCURSOR.BIN
  496.                Usage: do MultiPick with <cArray>,<nDown>,<nLast>,<nRows>,;
  497.                              <nLength>[,<cColors>[,<cCheck>]]
  498. SMultPick   -- Subroutine of MultiPick -- used to handle a display loop.
  499.                Usage: doSMultPick
  500. YesQuit()   -- Subroutine for MultiPick. 
  501.                Usage: YesQuit()
  502. YNMouse()   -- Mouseable Yes/No Dialog Box. REQUIRES MUSCLICK.BIN
  503.                Usage: YnMouse(<cColors>,<cP1>[,<cP2>...][,<lYes>])
  504. CWnSize()   -- Returns a string of four characters (chr() values) +1 for
  505.                the coordinates of the current window/screen. 
  506.                REQUIRES: VDCURSOR.BIN
  507.                Usage: cWnSize()
  508. nWBSrch()   -- Subroutine for cWnSize() above.
  509. CWnDecode() -- Used to return numeric values based on CWNSIZE() above.
  510.                Usage: cWnDecode(<cWnString>,<cEdge>|<nPos>)
  511. SetBorder   -- Brings up a picklist and sample of possible borders from
  512.                routine NEWBORDER() above. Allows user to select borders
  513.            for use in routines. Escaping or using left/right arrows
  514.            returns to original border selection (from before calling
  515.            routine). NOTE: THIS WILL ONLY WORK IN dBASE IV, 2.0 (or 
  516.            later), due to use of ON POPUP command ...
  517.            Usage: Do SetBorder with <cColor>
  518. DrawIt      -- Routine used with SetBorder to draw sample area in window.
  519.                Usage: Do DrawIt
  520. Wait4Key()  -- Used to deal with a read-timeout. Wait for <nSeconds>, if
  521.                no keypress, abort the read.
  522.            Usage: @... get <field> when Wait4Key(<nSeconds>)
  523.  
  524. --------------------------------------------------------------------------------
  525. COLOR.PRG -- Color Processing
  526. --------------------------------------------------------------------------------
  527. AttriByte() -- Returns the attribute byte of a dBASE Color code.
  528.                Usage: AttriByte("<cCode>")
  529. ColorName() -- Converts an attribute value for an area to the name of the
  530.                corresponding color combination. 
  531.                Usage: ColorName(<nAttr>)
  532. ColorCode() -- Given a color attribute byte, returns dBASE color code.
  533.                Usage: ColorCode(<nAttr>)
  534. ColorOf()   -- Returns the color of attributes in dBASE, as currently set.
  535.                Usage: ColorOf("<cArea>")
  536. NormColors()-- Returns the 'normal' portion of a color string.
  537.                Usage: NormColors(<cColor>)
  538. HighColors()-- Returns the 'highlight' portion of a color string.
  539.                Usage: HighColors(<cColor>)
  540. BordColors()-- Returns the 'border' portion of a color string.
  541.                Usage: BordColors(<cColor>)
  542. OppColor()  -- Returns a color string contrasting nicely with the one
  543.                given as a parameter. Basically inverts the color passed
  544.                to it.
  545.                Usage: OppColor(<cColor>)
  546. ForeColor() -- Returns foreground part of color string.
  547.                Usage: ForeColor(<cColor>)
  548. BackColor() -- Returns background part of color string.
  549.                Usage: BackColor(<cColor>)
  550.  
  551. --------------------------------------------------------------------------------
  552. STRINGS.PRG -- Character String Processing
  553. --------------------------------------------------------------------------------
  554. Proper()    -- Converts text to "proper" case (upper/lower case, handles
  555.                contractions, Mc, Mac, etc.). Useful for names (converts first
  556.                letter to upper case, the rest to lower, except as above).
  557.                Usage: Proper("<cArg>")
  558. Dots()      -- Used to pad a field with dots (dot leader, trailer ...) 
  559.                Usage: Dots(<cFld>,<nLength>,"<cType>")
  560.                    cType must be L (left), C (center), or R (right)
  561. CutPaste()  -- Used to Cut a string and Paste another in it's place. It's
  562.                an easier way to use the STUFF() function.
  563.                Usage: CutPaste(<cFld>,<cLookFor>,<cRepWith>)
  564. LastWord()  -- Used to return the last "word" of a string of characters (words
  565.                being bracketed by spaces).
  566.                Usage: LastWord(<cString>)
  567. VStretch()  -- Displays a long character field (254 char) on screen, with
  568.                wrap-around, and handles proper word-breaks - you give
  569.                dimensions for where you want it displayed (window).
  570.                Usage: VStretch(<cFld>,<nULRow>,<nULCol>,<nBRRow>,<nBRCol>)
  571. AtCount()   -- Returns the number of times a string is found in another.
  572.                Usage: AtCount(<cFindStr>,<cBigStr>)
  573. IsAlNum()   -- If first character of string is alphabetic or digit, returns
  574.                .t., otherwise returns .f..
  575.                Usage: IsAlNum(<cChar>)
  576. IsAscii()   -- If first character is in ASCII (normal, not extended) character
  577.                set, returns .t., otherwise returns .f..
  578.                Usage: IsAscii(<cChar>)
  579. IsCntrl()   -- If first character is a delete or control character, returns
  580.                .t., otherwise returns .f..
  581.                Usage: IsCntrl(<cChar>)
  582. IsDigit()   -- If first character is a digit, returns .t..
  583.                Usage: IsDigit(<cChar>)
  584. IsPrint()   -- If first character is a printing character (space through
  585.                chr(126), returns .t..
  586.                Usage: IsPrint(<cChar>)
  587. IsXDigit()  -- If first character is possible hexadecimal digit, returns .t..
  588.                Usage: IsXDigit(<cChar>)
  589. IsSpace()   -- Returns .t. if first character is space, tab, carriage return,
  590.                line feed, vertical tab, or formfeed.
  591.                Usage: IsSpace(<cChar>)
  592. Name2Label()-- Returns a name held in five fields as a single field for the
  593.                purpose of printing in a label.
  594.                Usage: Name2Label(<nLength>,<cPrefix>,<cFirstName>,;
  595.                                   <cMidName>,<cLastName>,<cSuffix>)
  596. StrpBrk()   -- Search string for first occurrence of any specific character(s).
  597.                Usage: StrpBrk(<cCharSet>,<cBigStr>)
  598. StrRev()    -- Reverse a string.
  599.                Usage: StrRev(<cAnyStr>)
  600. Strip2Val() -- Strip characters from the left until reaching one that might
  601.                begin a numeric value ...
  602.                Usage: Strip2Val(<cString>)
  603. StripVal()  -- Strip characters until reaching one that is NOT part of a
  604.                number.
  605.                Usage: StripVal(<cString>)
  606. ParseWord() -- Finds first word in a character string.
  607.                Usage: ParseWord(<cW>)
  608. StripWord() -- Removes first word in character string.
  609.                Usage: StripWord(<cW>)
  610. Plural()    -- Returns the "plural" of a noun. This will fit most cases, but not
  611.                all, as English has too many exceptions. 
  612.                Usage: Plural(<nItems>,"<cNoun>")
  613. StrComp()   -- Compares the contents of two strings.
  614.                Usage: StrComp(<cStr1>,<cStr2>)
  615. StrOccur()  -- Calculates the number of occurences of a string in another,
  616.                works for character memvar/field, and memo fields.
  617.                Usage: StrOccur(<cInString>,<cFindString>)
  618. NumOccur()  -- Calculates the number of occurences of a string in another.
  619.                Usage: NumOccur(<cInString>,<cFindString>)
  620. ReplMemo()  -- Globally searches and replaces a string with another string
  621.                in a character field/memvar or memo field.
  622.                Usage: ReplMemo(<cSource>,<cCurrStr>,<cNewStr>)
  623. MemStuff()  -- Replaces a specific string in a character string, by another.
  624.                Returns the resultant string.
  625.                Usage: MemStuff(<cSource>,<cCurrStr>,<cNewStr>)
  626. Stub()      -- Returns a specific number of characters from a given string, 
  627.                adding characters in cIn to the end of it.
  628.                Usage: Stub(<cString>,<nIn>,<cIn>)
  629. FirstMem()  -- Capitalizes the first character of all the words in the string
  630.                passed as a parameter, returns resultant string (unless a memo,
  631.                in which case, returns a .T.)
  632.                Usage: FirstMem(<cInStr>)
  633. FirstCap()  -- Capitalizes the first character of a string.
  634.                Usage: FirstCap(<cInString>)
  635. StripND()   -- Strips non-digit characters from a character string, returning
  636.                a string containing only digits.
  637.                Usage: StripND(<cNumArg>)
  638. Strip()     -- Strips specific character(s) from a character string.
  639.                Usage: Strip(<cVar>,<cArg>)
  640. WordWrap    -- A routine to handle wrapping text within a specified width.
  641.                Usage: do WordWrap with <nRow>,<nCol>,<cText>,<nWidth>
  642. BreakName() -- This returns part of a name. Programmer is responsible for
  643.                defining windows and such for it's use.
  644.            Usage: BreakName(<cName>[,<cPart>])
  645. NamePart()  -- Guesses a portion of a name, based on <cPart>. Used with 
  646.                BreakName() above. 
  647.            Usage: NamePart(<cName>,<cPart>)
  648. NameMark()  -- Guesses portion of a name, based on <cPart>. Used with
  649.                MarkLine().
  650.            Usage: NameMark(<cName>,<cPart>,<cEnd>)
  651. MarkLine()  -- Presents a string with the cursor at a given position in the
  652.                string. Allows user to move cursor to a new position in the
  653.            string.
  654.            Usage: MarkLine(<cLine>[,<nPos>])
  655. DeCode()    -- Decodes a string encoded with EnCode() below. Used for
  656.                simple password protection.
  657.            Usage: DeCode(<cInput>)
  658. EnCode()    -- Encodes a string, can be decoded with DeCode() above. Used for
  659.                simple password protection.
  660.            Usage: EnCode(<cInput>)
  661. ExEqual()   -- EXactly Equal. Used to test two memvars for an exact match.
  662.                Usage: ExEqual(<cInput1>,<cInput2>)
  663. Str_Edit()  -- Used to strip unwanted characters from an input string.
  664.                Usage: Str_Edit(<cInput>,<cBadChars>)
  665.  
  666. --------------------------------------------------------------------------------
  667. CONVERT.PRG -- Numeric Conversions/calculations
  668. --------------------------------------------------------------------------------
  669. Roman()     -- Function to return a Roman Numeral based on input of an Arabic.
  670.                Usage: Roman(<nArabic>)
  671. Arabic()    -- Opposite of Roman (takes Roman Numeral provided, returns
  672.                Arabic).
  673.                Usage: Arabic("<cRoman>")
  674. Factorial() -- Does what it sounds like, it returns the factorial of a value.
  675.                Usage: Factorial(<nNumber>)
  676. IsPrime()   -- Determines if the argument passed is a prime positive integer.
  677.                Usage: IsPrime(<nNumber>)
  678. BankRound() -- Rounds numeric argument to given # of places using "Banker's 
  679.                rule."
  680.                Usage: BankRound(<nNumber>,<nPlaces>)
  681. Num2Str()   -- Number to String, uses ASCII 1/2 and 1/4 instead of decimals
  682.                where appropriate.
  683.                Usage: Num2Str(<nNumber>)
  684. Dec2Hex()   -- Decimal to Hexadecimal conversion.
  685.                Usage: Dec2Hex(<nDecimal>)
  686. Hex2Dec()   -- Hexadecimal to Decimal conversion.
  687.                Usage: Hex2Dec(<cHex>)
  688. Hex2Bin()   -- Hexadecimal to Binary conversion.
  689.                Usage: Hex2Bin(<cHex>)
  690. Bin2Hex()   -- Binary to Hexadecimal conversion.
  691.                Usage: Bin2Hex(<cBin>)
  692. Dec2Oct()   -- Decimal to Octal conversion.
  693.                Usage: Dec2Oct(<nDec>)
  694. Oct2Dec()   -- Octal to Decimal conversion.
  695.                Usage: Oct2Dec(<xOct>)
  696. Cash2Check()-- Converts a number of dollars and cents to a string of words.
  697.                Usage: Cash2Check(<nCash>)
  698. Num2Words() -- Converts an integer to a string of words.
  699.                Usage: Num2Words(<nNum>)
  700. Thou2Words()-- Converts a positive integer less than 1000 to a string of words.
  701.                Usage: Thou2Words(<nNum>)
  702. Ord()       -- Converts an integer to ordinal representation.
  703.                Usage: Ord(<nNum>)
  704. Num2Word()  -- Converts an integer to a string of words -- self-contained
  705.                function, does not call other functions. 
  706.                Usage: Num2Word(<nValue>)
  707. Num2Real()  -- Converts a number to the ASCII representation of its storage in
  708.                IEEE 8-byte real format.
  709.                Usage: Num2Real(<nNum>,<nExp>)
  710. Dec2Bin()   -- Decimal to Binary conversion.
  711.                Usage: Dec2Bin(<nNum>,<nPlaces>)
  712. Frac2Bin()  -- Converts the fractional part of a decimal number to a
  713.                character string giving its ASCII binary representation.
  714.                Usage: Frac2Bin(<nNum>,<nPlaces>)
  715. Bin2Dec()   -- Converts a string containing a binary value to its numeric 
  716.                (decimal) equivalent.
  717.                Usage: Bin2Dec(<cStr>)
  718. Dec2Mkd()   -- Decimal to echit chr() values in array. (Roughly equivalent to 
  719.                MDK$() in BASIC)
  720.                Usage: Dec2Mkd(<nVar>,<cName>)
  721. Dec2Mki()   -- Converts an integer in range -32,768 to +32,767 to two chr() 
  722.                values equivalent to the two bytes created by the BASIC MKI$().
  723.                Usage: Dec2Mki(<nInt>,<cName>)
  724. Dec2Mkl()   -- Converts integer to four chr() values in array. Equivalent to 
  725.                MKL$() in BASIC.
  726.                Usage: Dec2Mkl(<nInt>,<cName>)
  727. Dec2Mks()   -- Converts numeric value to four chr() values in array. Equivalent 
  728.                to MKS$() in BASIC.
  729.                Usage: Dec2Mks(<nVar>,<cName>)
  730. Dec2MSks()  -- Convert numeric to four CHR() values in array. Uses obsolete
  731.                MicroSoft format. 
  732.                Usage: Dec2MSks(<nVar>,<cName>)
  733. Mkd2Dec()   -- Convert eight bytes storing an IEEE long real value (similar to
  734.                CVD() function in BASIC)
  735.                Usage: Mkd2Dec(<c1>,...,<c8>)
  736. Mki2Dec()   -- Convert two bytes storing a signed short integer to decimal
  737.                equivalent. Similar to CVI() in BASIC.
  738.                Usage: Mki2Dec(<c1>,<c2>)
  739. Mkl2Dec()   -- Convert four bytes storing a signed long integer. Similar to 
  740.                CVL() in BASIC.
  741.                Usage: Mkl2Dec(<c1>,<c2>,<c3>,<c4>)
  742. Mks2Dec()   -- Converts four bytes storing an IEEE Short real value. Similar to
  743.                CVS() in BASIC.
  744.                Usage: Mks2Dec(<c1>,<c2>,<c3>,<c4>)
  745. MSks2Dec()  -- Converts four bytes storing an old-style Microsoft short real
  746.                value to decimal. Similar to CVS() in BASIC.
  747.                Usage: MSks2Dec(<c1>,<c2>,<c3>,<c4>)
  748. Ordinal()   -- Returns an ordinal string for a positive integer < 100. For
  749.                values greater than this, use Num2Words(), and use this for
  750.                the values < 100.
  751.                Usage: Ordinal(<nNum>)
  752.  
  753. --------------------------------------------------------------------------------
  754. DATES.PRG -- Date Handling Routines
  755. --------------------------------------------------------------------------------
  756. DateText3() -- As DateText() and DateText2() in PROC.PRG, returns: Month, Year.
  757.                Usage: DateText3(<dDate>)
  758. Age2()      -- Returns age of someone on the date of a specific event.
  759.                Usage: Age2(<dDate>,<dEvent>)
  760. Annivrsry() -- Checks to see if a birthday or other specific "anniversary" is 
  761.                within a range of dates.
  762.                Usage: Annivrsry(<dTest>,<dBegin>,<dEnd>)
  763. AddMonths() -- Returns the exact date 'N' months from give date.
  764.                Usage: AddMonths(<dDate>,<nMonths>)
  765. AddYears()  -- Returns the exact date 'N' Years from given date.
  766.                Usage: AddYears(<dDate>,<nYears>)
  767. IsLeap()    -- Returns .t./.f. if year is a leap year... (year in YY or YYYY
  768.                formats)
  769.                Usage: IsLeap(<nYear>)
  770. DoY()       -- Day of Year -- returns "Julian" date (US Government version ...)
  771.                -- this is the number of days a date is from January 1 of that
  772.                year (i.e., 11/14/91 = 318).
  773.                Usage: DoY(<dDate>)
  774. WeekNo()    -- Returns the week number of the date (there are 52 weeks a year,
  775.                right?). 
  776.                Usage: WeekNo(<dDate>)
  777. Holiday()   -- Returns the date of specific "floating" holidays for a given
  778.                year, requires a one-letter code. See full doc in DATES.PRG.
  779.                Usage: Holiday(<nYear>,<cCode>)
  780.                Where cCode may be one of the following:
  781.                      P = President's Day
  782.                      D = Daylight Saving Time
  783.                      M = Memorial Day
  784.                      L = Labor Day
  785.                      C = Columbus Day
  786.                      S = Return to "Standard" Time
  787.                      E = Election Day
  788.                      T = Thanksgiving Day
  789.                      A = Advent 1st Sunday
  790. EasterDay() -- This returns the day of Easter. It doesn't work as easily as
  791.                those dates given above, so has it's own function.
  792.                Usage: EasterDay(<nYear>) && nYear = YYYY format
  793. nDoW()      -- Numeric Day of Week -- used to return the numeric value of a 
  794.                character day of the week, useful for some of the revised
  795.                functions below.
  796.                Usage: nDoW(<cDay>)
  797. FWDoM()     -- First Working Day Of the Month -- this returns the first working
  798.                day of the month passed to the function.
  799.                Usage: FWDoM(<dDate>)
  800. LWDoM()     -- Last Working Day Of the Month --  returns the last working day
  801.                of the month passed to the function.
  802.                Usage: LWDoM(<dDate>)
  803. FDoD()      -- First Day of Date -- this returns the first occurrence of a given
  804.                day of the week within a month. For example, you might need the
  805.                first Monday of the month. 
  806.                Usage: FDoD(<dDate>,"<cDay>")  (cDay = Monday, Tuesday, etc.)
  807. LDoD()      -- Last Day of Date -- This returns the last occurrence of a given
  808.                day of the week within a month. For example, you might need the 
  809.                last Monday in a month.
  810.                Usage: LDoD(<dDate>,"<cDay>")
  811. LDoM()      -- Last Day of Month -- this returns the last day of the month
  812.                as a date. It's used in LDoD and LWDoM above.
  813.                Usage: LDoM(<dDate>)
  814. NumDoD()    -- Number of Day of Date -- this returns a specific occurrence of a
  815.                given day of the week within a month. For example, you might need
  816.                the 3rd Tuesday of the month.
  817.                Usage: NumDoD(<dDate>,<nDay>,"<cDay>")
  818. WDIF()      -- Work Days In the Future -- this is used to return the date based
  819.                on a number of work-days from another date. For example, you 
  820.                could find the date of the 10th work date from today (date())
  821.                by using date(),10 as the parameters in the format below. This
  822.                function can use a HOLIDAYS database to be more accurate, but
  823.                you must create it in a specific format (see complete function 
  824.                documentation in the file DATES.PRG).
  825.                Usage: WDiF(<dStart>,nWDays)
  826. StoD()      -- String to Date -- this returns a "normal" dBASE date from a
  827.                character string containing formats of YYYYMMDD or YYMMDD.
  828.                Usage: StoD("<cString>")
  829. Quarter()   -- This function returns the "Quarter" of the year that a specified
  830.                date is in ...
  831.                Usage: Quarter(<dDate>)
  832. Dat2Jul()   -- Convert dBASE date to Julian date
  833.                Usage: Dat2Jul(<dDate>)
  834. Jul2Dat()   -- Convert Julian date to dBASE date
  835.                Usage: Jul2Dat(<nJulian>)
  836. FrstNxtMth()-- Returns the first day of next month, given a date in 'current'
  837.                month.
  838.                Usage: FrstNxtMth(<dDate>)
  839. FDoM()      -- Returns the first day of the month a specific date is in.
  840.                Usage: FDoM(<dArg>)
  841. FDoY()      -- Returns first day of year (January 1) that a specific date is in.
  842.                Usage: FDoY(<dArg>)
  843. LDoY()      -- Returns last day of year (December 31) that a specific date is
  844.                in. 
  845.                Usage: LDoY(<dArg>)
  846. QDate()     -- Allows user to enter date as if using Intuit's Quicken. Used
  847.                with WHEN clause ...
  848.                Usage: @x,y GET <dArg> WHEN QDate(<dArg>)
  849. HebrewDate()-- Converts a date to corresponding date on the Hebrew Calendar.
  850.                The date returned is the Hebrew date that matches the daylight
  851.            hours of the given civil date; the Hebrew date actually starts
  852.            the evening before.
  853.            Usage: HebrewDate(<dDate>)
  854. CivilDate() -- Converts a Hebrew calendar date to corresponding date on the
  855.                civil calendar.
  856.            Usage: CivilDate(<cDate>)
  857. Date2Heb()  -- Used in HebrewDate() above, to perform the actual conversion.
  858.                Usage: Date2Heb(<dDate>)
  859. Kebiah()    -- Kebiah of a year, using Arthur Spier's Notation. Tells whether
  860.                the year in the Hebrew Calendar is defective, regular or
  861.            excessive and whether or not a leap year.
  862.            Usage: Kebiah(<dRosh1>,<dRosh2>)
  863. Roshashana()-- Returns date of Rosh Hashana of the given Hebrew Year.
  864.                Usage: Roshashana(<nYear>)
  865. Dechiyoth() -- Adjusts date of Rosh Hashana for the four dechiyoth
  866.                (postponements) required to regularize the calendar and
  867.            prevent either two days in a row of Sabbath at Yom Kippur or
  868.            Hoshana Rabbah being on the Sabbath.
  869.            Usage: Dechiyoth(<dDate>,<nHours>,<nChalokim>)
  870. IsLeapH()   -- Determines if an Hebrew year is a leap year.
  871.                Usage: IsLeapH(<nYear>)
  872. NormalH     -- Normalize date and numbers of hours and chalokim.
  873.                Usage: Do NormalH with <dDate>,<nHours>,<nChalokim>
  874. MDY_Udf()   -- This is a variation on MDY() (built-in). It displays dates
  875.                in a nice format regardless of the Set CENTURY setting.
  876.            Usage: Mdy_udf(<dDate>)
  877.  
  878. --------------------------------------------------------------------------------
  879. TIME.PRG Time Processing Routines
  880. --------------------------------------------------------------------------------
  881. Delay()     -- Delay loop in seconds.
  882.                Usage: Delay(<nSeconds>)
  883. Time2Sec()  -- Convert time string to seconds.
  884.                Usage: Time2Sec(<cTime>)
  885. Sec2Time()  -- Convert seconds to time string.
  886.                Usage: Sec2Time(<nSeconds>)
  887. DiffTime()  -- Calculate difference btween two time strings.
  888.                Usage: DiffTime(<cTime1>,<cTime2>)
  889. Civ2Mil()   -- Convert civilian time string (i.e., "12:59 A.M.") to 24 hour
  890.                (military) time.
  891.                Usage: Civ2Mil(<cCivilTime>)
  892. Mil2Civ()   -- Convert military (24 hour) time to Civilian time.
  893.                Usage: Mil2Civ(<cMilTime>)
  894. IsAmPm()    -- Checks to see if a time string is in "Civilian" time format 
  895.                (i.e., AM/PM) -- returns a logical (.t./.f.)
  896.                Usage: IsAmPm(<cTime>)
  897. AddTimes()  -- Adds two time-strings together, returning a valid time string.
  898.                Usage: AddTimes(<cTime1>,<cTime2>|<nHours>)   
  899.  
  900. --------------------------------------------------------------------------------
  901. FINANCE.PRG -- Finance Functions
  902. --------------------------------------------------------------------------------
  903. Discount()  -- Compute the present value of an amount received at the end of
  904.                a number of periods given a periodic interest rate.
  905.                Usage: Discount(<nFuturVal>,<nRate>,<nPeriods>)
  906. FuturVal()  -- Compute the future value of an initial amount at compound
  907.                interest received at a given periodic rate for a number of 
  908.                periods.
  909.                Usage: FuturVal(<nPresVal>,<nRate>,<nPeriods>)
  910. Rate()      -- Compute rate of periodic interest needed to produce a future
  911.                value from a present value in a given number of periods.
  912.                Usage: Rate(<nFutVal>,<nPresVal>,<nPeriods>)
  913. ContRate()  -- Compute rate if compounding is continuous.
  914.                Usage: ContRate(<nFutVal>,<nPresVal>,<nYears>)
  915. NPV()       -- Net Present Value of array aCashFlow[n].
  916.                Usage: NPV(<nRate>,<nPeriods>)
  917. IRR()       -- Internal Rate of Return, using ZeroIn().
  918.                Usage: Irr(<fX1>,<fX2>,<n_Flag>)
  919. IRR2()      -- Internal Rate of Return, traditional analysis of periodic
  920.                cashflows. Returns periodic rate of return which must be analyzed
  921.                by the user. Uses an iterative process and multiple answers
  922.                are possible.
  923.                Usage: Irr2(<nN>,<cFlow>,<lSw>,<nGuess>)
  924. FVIrr()     -- Companion to Irr2(). Irr() searches the function for NPV for 
  925.                roots, while FVIrr searches the function for NFV.
  926.                Usage: FVIrr(<nN>,<cFlow>,<lSw>,<nGuess>)
  927. MIrr()      -- Modified Internal Rate of Return -- employs a financial manager's
  928.                analysis of the cost of reserve funds and a likely reinvestment 
  929.                rate for receipts. Returns periodic rate of return which must
  930.                be annualized by the user. Solves directly for a unique answer.
  931.                Usage: MIrr(<nN>,<cFlow>,<nRRate>,<nFRate>)
  932. XIrr()      -- Internal Rate of Return not constrained by evenly-spaced
  933.                periods of chasflow, but uses dates of transactions. Returns
  934.                annulaized rate of return based on daily compounded interest.
  935.                Iterative process with multiple answers possible.
  936.                Usage: XIrr(<nN>,<cFlow>,<lSw>,<nGuess>)
  937. FVXIrr()    -- Companion to XIrr() with the search for roots of the NFV 
  938.                function. See FVIrr() above.
  939.                Usage: FVXIrr(<nN>,<cFlow>,<lSw>,<nGuess>)
  940. XMIrr()     -- Modified Internal Rate of Return without the constraint of
  941.                evenly spaced periods, uses dates of transactions and returns
  942.                annualized rate of return based on daily compounded interest.
  943.                Solves directly for a unique answer.
  944.                Usage: XMIrr(<nN>,<cFlow>,<nRRate>,<nFRate>)
  945.  
  946. --------------------------------------------------------------------------------
  947. ARRAY.PRG -- Array Processing Routines
  948. --------------------------------------------------------------------------------
  949. AFill()     -- Fills an array with sequential elements. Useful for testing
  950.                array processing routines.
  951.                Usage: FillArray(<aArray>,<nArraySize>,<nFirstValue>,<nStep>)
  952. AMask()     -- Returns a "mask" specifying the desired row or column of an
  953.                array.
  954.                Usage: AMask(<cArrayskel>,<cVar>)
  955. AMean()     -- Mean of non-blank numeric or date values in specified row or
  956.                column of an array.
  957.                Usage: AMean(<cArrayskel>)
  958. AMax()      -- Maximum non-blank numeric, date or character value in specified
  959.                row or column of an array.
  960.                Usage: AMax(<cArrayskel>)
  961. AMin()      -- Minimum non-blank numeric, date or character value in specified
  962.                row or column of an array.
  963.                Usage: AMin(<cArrayskel>)
  964. AVar()      -- Finds population variance of non-blank numeric or date values
  965.                in specified row or column of a specified array.
  966.                Usage: AVar(<cArrayskel>)
  967. ASeek()     -- Performs a binary search in any specified ascending-sorted row
  968.                or column of an array.
  969.                Usage: aSeek(<cFindItem>,<aArray>,<nArraySize>)
  970. AShuffle()  -- Performs a shuffle of elements of an array randomly ...
  971.                Usage: aShuffle(<aArray>,<nLength>)
  972. ABubble()--    Performs a bubble sort (slow) on an array. By telling the
  973.                routine the number of passes, you can have it stop at a specific
  974.                point, and obtain some of the highest or lowest values, without
  975.                taking the time to perform a complete sort. To perform a
  976.                complete sort, pass the same value for nPasses as for nLength 
  977.                (number of elements in array) -- if you want a complete sort,
  978.                however, you may want to take another look at ShellSort()
  979.                below ... it's faster.
  980.                Usage: aBubble(<aArray>,<nLength>,<nPasses>)
  981. ArrayRows() -- Returns number of rows (elements) in an array.
  982.                Usage: ArrayRows(<aArray>)
  983. ArrayCols() -- Returns number of columns in an array.
  984.                Usage: ArrayCols(<aArray>)
  985. ShellSort() -- Performs a fast sort routine on an array. This array must be
  986.                copied into an array called: aMyArray. 
  987.                Usage: ShellSort(<nNumber>)
  988. ARec2Arr()  -- Creates a public array, aRecord[n], initialized to the record
  989.                format of the currently selected DBF, either blank or filled
  990.                with the values of the current record.
  991.                Usage: ARec2Arr(<lBlank>)
  992. aPullSort() -- Performs a sort on an array. This array must be copied into an
  993.                array called: aMyArray. This routine is theoretically faster than
  994.                the ShellSort() routine above, and definitely faster than the
  995.                aBubble() routine above.
  996.                Usage: aPullSort(<nNumber>)
  997.  
  998. --------------------------------------------------------------------------------
  999. MEASURE.PRG -- Conversion of Measurements
  1000. --------------------------------------------------------------------------------
  1001. Kg2Lb()     -- Used to convert Kilograms to Pounds.
  1002.                Usage: Kg2Lb(<nKg>)
  1003. Lb2Kg()     -- Used to convert Pounds to Kilograms.
  1004.                Usage: Lb2Kg(<nPounds>)
  1005. Inch2Cm()   -- Inches to Centimeters.
  1006.                Usage: Inch2Cm(<nInches>)
  1007. Cm2Inch()   -- Centimeters to Inches.
  1008.                Usage: Cm2Inch(<nCm>)
  1009. Km2Mile()   -- Kilometers to Miles.
  1010.                Usage: Km2Mile(<nKm>)
  1011. Mile2Km()   -- Miles to Kilometers.
  1012.                Usage: Mile2Km(<nMiles>)
  1013. Km2Naut()   -- Kilometers to Nautical miles.
  1014.                Usage: Km2Naut(<nKm>)
  1015. Naut2Km()   -- Nautical miles to Kilometers.
  1016.                Usage: Naut2Km(<nNautMiles>)
  1017. Naut2Stat() -- Nautical miles to Statute miles (approximate).
  1018.                Usage: Naut2Stat(<nNautMiles>)
  1019. Stat2Naut() -- Statute miles to Nautical miles (approximate).
  1020.                Usage: Stat2Naut(<nStatMiles>)
  1021. Fahr2Cel()  -- Fahrenheit to Celsius.
  1022.                Usage: Fahr2Cel(<nFahrTemp>)
  1023. Cel2Fahr()  -- Celsius to Fahrenheit.
  1024.                Usage: Cel2Fahr(<nCelTemp>)
  1025. Gal2Ltr()   -- US Gallons to Liters
  1026.                Usage: Gal2Ltr(<nGal>)
  1027. Ltr2Gal()   -- Liters to US Gallons
  1028.                Usage: Ltr2Gal(<nLiters>)
  1029. CuFt2Gal()  -- Cubic feet to US Gallons
  1030.                Usage: CuFt2Gal(<nCubicFeet>)
  1031. Gal2CuFt()  -- US Gallons to Cubic Feet
  1032.                Usage: Gal2CuFt(<nGallons>)
  1033.  
  1034. --------------------------------------------------------------------------------
  1035. TRIG.PRG -- Trigonometric Functions
  1036. --------------------------------------------------------------------------------
  1037. Note, all of these have the Usage:  FUNC(<nX>)
  1038.  
  1039. Secant()    -- Secant of an angle X in radians.
  1040. Cosecant()  -- CoSecant of an angle X in radians.
  1041. CoTan()     -- CoTangent of an angle X in radians.
  1042. ASec()      -- Inverse Secant - angle size in radians.
  1043. ACoSec()    -- Inverse Cosecant - angle size in radians.
  1044. ACoT()      -- Inverse CoTangent
  1045. SinH()      -- Hyperbolic Sine
  1046. CosH()      -- Hyperbolic CoSine
  1047. TanH()      -- Hyperbolic Tangent
  1048. SecH()      -- Hyperbolic Secant
  1049. CScH()      -- Hyperbolic CoSecant
  1050. CoTH()      -- Hyperbolic CoTangent
  1051. ASinH()     -- Inverse Hyperbolic Sine
  1052. ACosH()     -- Inverse Hyperbolic CoSine
  1053. ATanH()     -- Inverse Hyperbolic Tangent
  1054. ASecH()     -- Inverse Hyperbolic Secant
  1055. ACscH()     -- Inverse Hyperbolic CoSecant
  1056. ACotH()     -- Inverse Hyperbolic Cotangent
  1057. Hav()       -- Haversine 
  1058. AHav()      -- Inverse Haversine
  1059.  
  1060. --------------------------------------------------------------------------------
  1061. NAVIGATE.PRG -- Navigation Routines
  1062. --------------------------------------------------------------------------------
  1063. Correct()   -- Correction of direction - adjusts direction given, in degrees,
  1064.                by a second number of degrees.
  1065.                Usage: Correct(<nDirection>,<xCorrection>)
  1066. UnCorrect() -- Uncorrection of direction - adjusts direction given, as above.
  1067.                This is the inverse of Correct().
  1068.                Usage: UnCorrect(<nDirection>,<xUnCorr>)
  1069. XAngle()    -- Angle in degrees (<=90) at which two vectors in degrees
  1070.                intersect.
  1071.                Usage: XAngle(<nVector1>,<nVector2>)
  1072. LeftWind()  -- Effect of second vector on first.
  1073.                Usage: LeftWind(<nCourse>,<nWindFrom>)
  1074. TailWind()  -- Is the effect of second vector on first additive?
  1075.                Usage: TailWind(<nCourse>,<nWindFrom>)
  1076. Heading()   -- Heading required to make good a course.
  1077.                Usage: Heading(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  1078. Course()    -- Course made good given heading, speed, wind dir, and force.
  1079.                Usage: Course(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  1080. GndSpeed()  -- Speed over the ground given heading, etc.
  1081.                Usage: GndSpeed(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  1082. Deg2Num()   -- Degrees to numbers ... converts character description of
  1083.                degrees (Degrees Minutes Seconds:  40d50'30.2 N) to numeric
  1084.                value.
  1085.                Usage: Deg2Num("<cDms>")
  1086. BearsDist() -- Distance to an object at the time of the second bearing.
  1087.                Usage: BearsDist(<nBear1>,<nBear2>,<nRun>)
  1088. BearsPass() -- Distance at which an object will be when abeam given 2 bearings.
  1089.                Usage: BearsPass(<nBear1>,<nBear2>,<nRun>)
  1090. BearsRun()  -- Distance to run until object will be abeam given two bearings.
  1091.                Usage: BearsRun(<nBear1>,<nBear2>,<nRun>)
  1092. GCDist()    -- Great Circle distance between 2 points given latitude and long.
  1093.                of each. 
  1094.                Usage: GcDist(<cLat1>,<cLon1>,<cLat2>,<cLon2>)
  1095. GcCourse()  -- Initial Great Circle course between two points given lat and 
  1096.                long of each. (Following a 'Great Circle' requires course 
  1097.                changes.
  1098.                Usage: GcCourse(<cLat1>,<cLon1>,<cLat2>,<cLon2>)
  1099.  
  1100. --------------------------------------------------------------------------------
  1101. STATS.PRG -- Statistical Routines
  1102. --------------------------------------------------------------------------------
  1103. Samplevar() -- Finds sample variance of specified field of the current database.
  1104.                Usage: SampleVar(<cField>[,<cClause>])
  1105. Stny()      -- Returns value of the standard normal distribution function given
  1106.                a number of standard deviations from the mean.
  1107.                Usage: Stny(<nDevs>)
  1108. StnArea()   -- Area of the standard normal distribution function between mean
  1109.                and given number of standard deviations from the mean.
  1110.                Usage: StnArea(<nDevs>)
  1111. Stnz()      -- Lookup table to find the values of 'z', standard deviations,
  1112.                corresponding to the most common areas inside a given number
  1113.                of tails of the normal distribution function.
  1114.                Usage: Stnz(<nProb>,<nTails>)
  1115. StnDiff()   -- Determines whether hypothesis that sample of a given mean is
  1116.                different from expected mean is justified.
  1117.                Usage: StnDiff(<nConf>,<nTails>,<nSample>,<nSampMean>,;
  1118.                                <nPopMean>,<nPopStd>)
  1119. StnDevs()   -- Calculates 'z', standard deviations, corresponding to any
  1120.                area of standard normal curve between mean and the desired
  1121.                z. Much slower than Stnz().
  1122.                Usage: StnDevs(<nArea>)
  1123. TstnArea()  -- Translation function to convert area to left of point under
  1124.                standard normal curve to 0 for ZeroIn().
  1125.                Usage: TstnArea(<nDevs>,<nArea>)
  1126. ZeroIn()    -- Finds a zero of a continuous function.
  1127.                Usage: ZeroIn(<cFunction>,<fX1>,fX2>,<fAbsError>,<nMaxiter>,;
  1128.                               <n_Flag>)
  1129.  
  1130. --------------------------------------------------------------------------------
  1131. FIELDS.PRG -- Field Processing Routines
  1132. --------------------------------------------------------------------------------
  1133. MemoPagr()  -- Used to display a memo in a window on screen, allows user to
  1134.                scroll up and down through memo.
  1135.                Usage: MemoPagr("<cMemo>",<nULRow>,<nULCol>,<nBRRow>,<nBRCol>)
  1136. ScanMemo    -- Used to remove hard returns in all memo fields in all records
  1137.                of a specified database.
  1138.                Usage: Do ScanMemo with "<cDbf>"
  1139. Cut         -- Used to cut to a global memvar CLIPBOARD the contents of a field
  1140.                or memvar on screen (during a read) -- can then be used with
  1141.                PASTE.
  1142.                Usage: do Cut with "<cFld>","<cScrType>"
  1143. Copy        -- Used to COPY to a global memvar CLIPBOARD the contents of a
  1144.                field or memvar on screen, so it can be used with PASTE.
  1145.                Usage: do Copy with "<cFld>"
  1146. Paste       -- Used to paste the contents of CLIPBOARD (global memvar) to
  1147.                the current field.
  1148.                Usage: do Paste with "<cFld>","<cScrType>"
  1149. Blanker()   -- Used to blank out a numeric field upon input of a valid numeric
  1150.                item. Useful with GETs ...
  1151.                Usage: Blanker()
  1152. GetRange()  -- Get a range for use with "SET KEY" or "SET FILTER" commands,
  1153.                works with character, numeric, float and date types.
  1154.                Usage: GetRange(<cTitle>,<xPara1>,<xPara2>,<cPicture>,;
  1155.                                <nStartRow>,<cColor>[,<cStyle>])
  1156. FldWidth()  -- Return the width of a field, without having to load the
  1157.                database structure into a file ...
  1158.                Usage: FldWidth(<nField>)
  1159. FldDec()    -- Returns the decimal position in a numeric field.
  1160.                Usage: FldDec(<nField>)
  1161.  
  1162. --------------------------------------------------------------------------------
  1163. FILES.PRG -- File Handling Routines
  1164. --------------------------------------------------------------------------------
  1165. AllTags     -- Used to bring up a popup/picklist of MDX tags ... can be
  1166.                assigned to a function key.
  1167.                Usage: do AllTags with <nULRow>,<nULCol>
  1168. RedoTags    -- Used to deal with "bloated" MDX files. This will delete old
  1169.                tags and recreate the MDX file, reducing the size of it, and
  1170.                making access faster. 
  1171.                Usage: do RedoTags with "<cDBF>" && note, do not include ext.
  1172. AutoRedo    -- Used to bring up a picklist of DBF files, so that you (or the
  1173.                user) can choose which to redo the tags for.
  1174.                Usage: do AutoRedo with <nXTL>,<nYTL>,<nXBR>,<nYBR>,<cColor>)
  1175. PrntTags    -- Used to print a list of tags/expressions to either the printer
  1176.                or a file for a specific database.
  1177.                Usage: do PrntTags with "<cDBF>"
  1178. ListDBFs    -- Used to create a simple database (DBFS.DBF) containing the names
  1179.                of all databases in the current directory.
  1180.                Usage: do ListDBFs
  1181. ReCompile() -- Recompiles all dBASE source-code files. 
  1182.                Usage: Recompile([<cDir>],[,<cSkel>[,"R"]])
  1183. MakeDbf     -- Makes an empty DBF.
  1184.                Usage: Do MakeDbf with <cFileName>,<aArray>
  1185. MakeDbf2    -- Makes an empty DBF, assumes array aMakeDBF[n,5].
  1186.                Usage: Do MakeDBF with <cDBFpath>,<cStruPath>
  1187. MakeStru()  -- Makes an empty dBASE Structure EXTENDED file and returns its
  1188.                root name.
  1189.                Usage: MakeStru()
  1190. MakeStru2() -- Makes an empty dBASE Structure EXTENDED file, using dBASE print
  1191.                redirection. User/programmer may specify to save database
  1192.                in directory specified by DBTMP (DOS Environment variable) or
  1193.                in the current directory.
  1194.                Usage: MakeStru2(<lDBTmp>)
  1195. TempName()  -- Returns a name that can be used for a file of given extension
  1196.                without conflicting with names of existing files. If extension
  1197.                is 'DBF', assures that no .DBT or .MDX of that name exists as 
  1198.                well.
  1199.                Usage: TempName(<cExtension>,<lDBTmp>)
  1200. FileMove    -- Used to handle data entry/editing, allowing the user to move
  1201.                through the database by pressing specific keys. See internal
  1202.                docs for more detail.
  1203.                Usage: do FileMove with <nKey>
  1204. Used()      -- Checks to see if a database is currently in use -- returns a
  1205.                logical.
  1206.                Usage: Used("<cFile>")
  1207. MDXByte()   -- Used to set the MDX Byte in a DBF header ON or OFF.
  1208.                Usage: MDXByte(<cDBFPath>,<cOnOff>)
  1209. aDir()      -- Creates a public array GADIR[n,4] containing directory 
  1210.                information. It is limited to 292 files or less, depending on
  1211.                the memory available. Requires SEARCH.BIN.
  1212.                Usage: aDir(<cFMask>,<cBINPath>,<cAttr>)
  1213. DBFDir()    -- Creates (or Overwrites) DBDDIR.DBF, and populates it with
  1214.                directory information. Uses the DOS 5.0 DIR command, and requires
  1215.                DOS 5.0. DO NOT ATTEMPT TO USE WITH PREVIOUS VERSIONS OF DOS.
  1216.                Usage: DBFDir(<cPathSkel>,<lHidSys>)
  1217. ParsPath()  -- Extracts and returns the path from a full path file 
  1218.                specification.
  1219.                Usage: ParsPath(<cFullPath>)
  1220. TagPop      -- Brings up a picklist of .MDX Tags for current database, so user
  1221.                can change sequence data is listed in. Lists key, whether or not
  1222.                tag has a 'for' clause or is unique, and gives most (if not all)
  1223.                of expression for the tag.
  1224.                Usage: do TagPop
  1225. AAppend()   -- Appends a text file into an array. This routine is limited to
  1226.                text files of 1,170 lines, and 254 characters per line. The
  1227.                text file must be an ASCII .TXT formatted file. Warning -- if
  1228.                array already exists, it will be overwritten.
  1229.                Usage: AAppend(<cFileName>,<aArrayName>)
  1230. FDel()      -- Deletes a given portion of a file (text or binary) from the
  1231.                beginning of the file, end of the file, or current pointer
  1232.                position. 
  1233.                Usage: FDel(<nHandle>,<nBytes>,<nStart>)
  1234. FGetLine()  -- Extracts a line of text from a text file.
  1235.                Usage: FGetLine(<cFileName>,<cLookup>[,<lCase>[,<lEntire>]])
  1236. FIns()      -- Inserts specified number of nulls into a low-level file. See
  1237.                comments on FDel().
  1238.                Usage: FIns(<nHandle>,<nBytes>,<nStart>)
  1239. GetInfo()   -- Retrieves information from STATUS that you cannot get with the
  1240.                dBASE IV function SET(). Keywords are:
  1241.                    WORK       Number of work area currently in
  1242.                    PRINT      Current printer destination (PRN, NUL, etc.)
  1243.                    ERROR      Error condition set by ON ERROR
  1244.                    ESCAPE     Escape condition set by ON ESCAPE
  1245.                    F2 to F10
  1246.                    Ctrl-F1 to Ctrl-F10
  1247.                    Shift-F1 to Shift-F10
  1248.                               Current setting of each key as set by SET FUNCTION
  1249.                    PAGE,LINE  Line number specified by ON PAGE AT LINE
  1250.                    HANDLE,<filename>
  1251.                               Handle number of low-level file <filename>
  1252.                    NAME,<filehandle>
  1253.                               Filename of low-level file specified by 
  1254.                                 <filehandle>
  1255.                    MODE,<filehandle>
  1256.                               Privilege of low-level file spec. by <filehandle>
  1257.                Usage: GetInfo(<cKeyWord>[,<cKeyWord2>])
  1258. TextLine()  -- Returns the number of lines of text in an ASCII Text file.
  1259.                Usage: TextLine(<cTextFile>)
  1260. TLine()     -- Returns a specific line in an ASCII Text File.
  1261.                Usage: TLine(<cTextFile>,<nLine>)
  1262. TLineNo()   -- Returns the line number of the phrase you are searching for
  1263.                in an ASCII Text File.
  1264.                Usage: TLineNO(<cTextFile>,<cLookup>[,<lCase])
  1265. TempFile()  -- Returns a random filename in temporary directory.
  1266.                Usage: TempFile([cFileExt])
  1267. TempDir()   -- Returns path of temporary directory as set from DOS (i.e.,
  1268.                SET DBTMP=...).
  1269. DirList()   -- Displays a popup showing all directories on a drive. User
  1270.                may select from list. Returns PATH. Requires TREE command from
  1271.                DOS be in path. Optional parm to change drive ...
  1272.                Usage: DirList([<cDrive>])
  1273. WhatDir     -- Procedure used by DirList() above to extract path from the bar
  1274.                of the popup selected.
  1275.                Usage: Do WhatDir with <nBar>,<cDir>
  1276. GRAt()      -- Graphic Reverse At() -- returns position of a graphic line-draw 
  1277.                character in a string.
  1278.                Usage: GRAt(<cString>)
  1279. FF()        -- FileFind -- brings up a popup of files that match a skeleton.
  1280.                Will Search complete drive, or a path specified. Uses standard
  1281.                DOS Wildcards (*,?).
  1282.                Usage: FF(<cFile>[,<cPath>])
  1283. MakeStr()   -- Will create an empty structure extended database.
  1284.                Usage: MakeStr(<cFilename.EXT>)
  1285. RecChged()  -- Test field values against memory variables to see if an
  1286.                on-screen display has changed from the disk-record.
  1287.            Usage: RecChged([<cAlias>])
  1288. CopyFile()     -- Copies a database, production .MDX, and .DBT (if these
  1289.                   exist). This is faster than COPY TO ...
  1290.           Usage: CopyFile(<cOldFile>,<cNewFile>)
  1291. CopyFil1()     -- Works as above, with open or closed .DBF/.MDX/.DBT files.
  1292.                   (Requires SET DBTRAP is set to OFF)
  1293.           Usage: CopyFil1(<cOldFile>,<cNewFile>)
  1294. RenFile()      -- Renames a .DBF/production mdx/.DBT if they exist, and
  1295.                   correctly updates the .MDX header.
  1296.           Usage: RenFile(<cOldFile>,<cNewFile>)
  1297. RenFile1()     -- As above, works with open or closed .DBF.
  1298.           Usage: RenFile1(<cOldFile>,<cNewFile>)
  1299. DelFile()      -- Deletes a database, production, and memo (.DBT) in one
  1300.                   swell foop. 
  1301.           Usage: DelFile(<cDBFName>)
  1302. DelMDX()       -- Deletes a production index file, correctly updating the
  1303.                   file header for the .DBF (avoiding error messages).
  1304.           Usage: DelMdx(<cMdxName>)
  1305. RestMDX()      -- Restore a pointer to an existing .MDX file in the
  1306.                   .DBF header. Only really needed if you make a mess using
  1307.                   DELMDX() above.
  1308.           Usage: RestMdx(<cMdxName>)
  1309. MdxPoint()     -- Changes the hard-coded .DBF name in an .MDX file header.
  1310.                   Usage: MdxPoint(<cDBFName>,<cMdx>)
  1311. DBFName()      -- Strips the 8-character .DBF filename out of the full
  1312.                   path returned by the DBF() function. Works on the
  1313.                   database in USE in the current workarea.
  1314.           Usage: DBFName()
  1315. MDXGauge()     -- Indexes a database, showing a 'fuel-gauge' style indicator.
  1316.                   SET DBTRAP must be off. Cleans up after itself with routines
  1317.                   below.
  1318.           Usage: MDXGauge(<cDataFile>,<cMdxExpr>,<cMdxTag>,;
  1319.                           [<cMdxName>,[<cClr>,[<nURow>,[<nLCol>]]]])
  1320. Gauge()        -- Used to "fill up" the gauge on screen during indexing. Used
  1321.                   with MDXGauge() above.
  1322.           Usage: Gauge()
  1323. DelGauge()     -- Used to delete reference to Gauge() from the .MDX header.
  1324.                   Usage: DelGauge(<cMdx>,<cTag>)
  1325. FindTagExp()   -- Finds the starting position of a specific index TAG
  1326.                   expression within an .MDX header.
  1327.           Usage: FindTagExp(<nHandle>,<cMdxTag>)
  1328. FLocate()      -- Finds a string within a file, starting from the current
  1329.                   position of the file pointer. 
  1330.           Usage: FLocate(<nHandle>,<cSearch>,<lWantUpper>)
  1331. FTell()        -- Shorthand way of finding the current position of the file
  1332.                   pointer in a file, without moving the pointer.
  1333.           Usage: FTell(<nHandle>)
  1334. FLen()         -- Finds length in bytes of a file and returns the file pointer
  1335.                   to byte 0.
  1336.           Usage: FLen(<nHandle>)
  1337. FReadI32()     -- Converts a 4-byte integer to its decimal value.
  1338.               Usage: FReadI32(<nHandle>)
  1339.  
  1340. --------------------------------------------------------------------------------
  1341. MISC.PRG -- Miscellaneous Routines
  1342. --------------------------------------------------------------------------------
  1343. PlayIt()    -- Plays a song based on parameter passed. 1 = Dirge, 
  1344.                2 = "touchdown", programmer may add more as needed ...
  1345.                Usage: PlayIt(<nSong>)
  1346. PageEst     -- Will estimate number of pages in a report, and then ask if you
  1347.                wish to generate said report ... requires three parameters:
  1348.                nCount = record count (may be 0, in which case procedure will
  1349.                         try to count the records)
  1350.                cReport = report name, with any FOR condition you wish -- if
  1351.                          you use a FOR condition, and give a '0' for the nCount
  1352.                          parameter, the procedure will count the records that
  1353.                          match the FOR (only a FOR is setup at the moment).
  1354.                nRecords = number of records that will print on a page. If you
  1355.                          send '0', the procedure will calculate based on 60 
  1356.                          records to the page.
  1357.                Usage: do PageEst with <nCount>,"<cReport>",<nRecords>
  1358. Permutes()  -- Permutations of a number of items taken x amount at a time.
  1359.                Usage: Permutes(<nNum>,<nHowMany>
  1360. Combos()    -- Combinations, similar to above -- slight difference. See docs.
  1361.                Usage: Combos(<nNum>,<nHowMany>)
  1362. BinLoad()   -- A function used to manage .BIN files.
  1363.                Usage: BinLoad(<cBinName>)
  1364. DialUp()    -- A simple dialer routine. (No longer requires LOWLEVEL.BIN)
  1365.                Usage: DialUp(<cPhoneNo>)
  1366. CurrPort()  -- Returns the current port being used by the SET PRINT command.
  1367.                Requires a database (CURRPORT.DBF, one field, 80 characters,
  1368.                called CURRPRT, indexed on said field ...)
  1369.                Usage: CurrPort()
  1370. FileLock()  -- Returns a logical if an attempt to lock a file on a LAN was
  1371.                successful, displays a message otherwise.
  1372.                Usage: FileLock("<cColor>")
  1373. RecLock()   -- Returns a logical if an attempt to lock a record on a LAN was
  1374.                successful, displays a message otherwise.
  1375.                Usage: RecLock("<cColor>")
  1376. UserID()    -- Returns the userid of the current user on a LAN. Returns a null
  1377.                string if not on a LAN.
  1378.                ** IF USING dBASE IV, 1.1 or less, requires USERID.BIN **
  1379.                Usage: UserID()
  1380. DosShell    -- Swaps out dBASE from memory, loads a DOS shell.
  1381.                Usage: do DosShell with <cAppName>
  1382. IsDisk()    -- Checks a disk in a disk drive to see if it's valid (door open,
  1383.                unformatted disk, etc.). ** Uses DISK.BIN **
  1384.                Usage: IsDisk("<cDrive>","<cColMess>","<cColErr>")
  1385. BlankIt     -- Used to act like a screen saver for dBASE. Displays a clock
  1386.                on the screen, waits for user to press <Esc> key.
  1387.                Usage: do BlankIt
  1388.                (suggest: ON KEY LABEL ALT-B DO BlankIt)
  1389. ClockIt     -- Used as part of BlankIt routine.
  1390. Clock       -- Same.
  1391. AuxMsg()    -- Will send output to a secondary monitor, if OX.SYS is loaded
  1392.                (via CONFIG.SYS).
  1393.                Usage: AuxMsg(<cMsg>,<lLF>)
  1394. GCD()       -- Greatest Common Divisor of two integers. Usually known as
  1395.                Euclid's Algorithm. 
  1396.                Usage: GCD(<n1>,<n2>)
  1397. RandSel()   -- Random Selection of Integers. Note that version 1.1 users
  1398.                will need to make some minor changes to this routine.
  1399.                Usage: RandSel(<nN>,<nT>[,<cArray>[,<lReSeed>]])
  1400. Bell()      -- 'Plays' the bell.
  1401.                Usage: Bell()
  1402.  
  1403. --------------------------------------------------------------------------------
  1404. PICKLIST.PRG -- "Generic" Picklist Routines
  1405. --------------------------------------------------------------------------------
  1406. Pick1()     -- Ken Holloway's generic picklist routine, allows user entering
  1407.                first letter of item, tab to another column, back tab, and so 
  1408.                on. Pretty spiffy.
  1409.                Usage: Pick1(<cTitle>,<cDisplay>,<cReturn>,<cKey>,<nFromRow>,;
  1410.                             <nFromCol>,<nToRow>,<nToCol>,<cColor1>,<cColor2>)
  1411. Pick2()     -- This picklist routine creates a picklist that determines it's
  1412.                own location on the screen by calling a couple of other functions
  1413.                (below) (uses BROWSE command -- Malcom C. Rubel).
  1414.                Usage: Pick2("<cLookFile>","<cTag>","<cSrchFld>","cRetFld>",;
  1415.                             <nScrRow>,<nScrCol>)
  1416. ScrRow()    -- Returns the row position of the current 'Get'. If the memvar
  1417.                nScrRow already exists, it returns the value in that memvar.
  1418.                Usage: ScrRow()
  1419. ScrCol()    -- Returns the column position of the current 'Get'. Works like 
  1420.                above, but for column.
  1421.                Usage: ScrCol()
  1422. Pick3       -- Martin Leon's DIYPOP routine. 
  1423.                Usage: do Pick2 with <cFields>,<nULRow>,<nULCol>,<nBRRow>,;
  1424.                                     <nBRCol>,<cNormCol>,<cFieldCol>,<cBorder>
  1425. Pick4()     -- Keith G. Chuvala's black-box picklist routine. This one's
  1426.                another rather spiffy routine. Includes selection of file,
  1427.                order and a "set key to" parameter, and ability to return
  1428.                value in the "normal" return manner, or to keyboard into
  1429.                a field.
  1430.                Usage: Pick4(<nRow>,<nCol>,<cTitle>,<cFileSpecs>,<cListWhat>,;
  1431.                             <nRetChar>,<nReturnType>,cColors)
  1432. PopList()   -- Used to replace the @M picture clause, use with a VALID REQUIRED
  1433.                clause. Can handle up to 9 parameters.
  1434.                Usage: PopList(<cOpt1>,<cOpt2>,...<cOpt9>)
  1435. Diacrit     -- Used to "keyboard" letters with diacritical marks directly into
  1436.                a field or memvar on screen, without requiring you memorize those
  1437.                dreary ASCII Codes. REQUIRES USE OF LocPop() below.
  1438.                Usage: on key label <keydef> do diacrit
  1439. LocPop()    -- Used to set upper left corner coordinates for a popup based on
  1440.                current "GET", used with WHEN clause of a get.
  1441.                Usage: LocPop(<nWidth>,<nLength>)
  1442.  
  1443. --------------------------------------------------------------------------------
  1444. SCA.PRG -- SCA Date Handling Routines
  1445. --------------------------------------------------------------------------------
  1446. SCA_Real    -- Special purpose for SCA (Society for Creative Anachronism),
  1447.                brings up a window, enter date in SCA dates, converts to "real"
  1448.                dates (dBASE format).
  1449.                Usage: do SCA_Real
  1450. SCA2Real()  -- This function works like SCA_Real, without the user-input.
  1451.                Usage: SCA2Real(<cDay>,<cMonth>,<cYear>) && cyear=Roman Numeral
  1452. Real_SCA()  -- Used to convert 'real' (dBASE format) dates into SCA dates.
  1453.                (see SCA_Real Procedure above)
  1454.                Usage: Real_SCA(<dDate>)
  1455.  
  1456. --------------------------------------------------------------------------------
  1457. FRPG.PRG -- FRPG (Fantasy Role-Playing Games) ROUTINES
  1458. --------------------------------------------------------------------------------
  1459. SetRand     -- Procedure used to set a random # table, based on the time it
  1460.                is called, multiplied by the seconds at that moment. Useful
  1461.                for calling before using any of routines below. Used ONCE
  1462.                in a dBASE session, should be enough. The reason for this
  1463.                procedure is that I have found that using RAND(-1) often returns
  1464.                exactly the same values if the exact same function call (i.e.,
  1465.                Dice() below) is made several times. This doesn't, therefore,
  1466.                do what I want. By using the current TIME, I can get a different
  1467.                random number table each time. Use EITHER this function OR
  1468.                RAND(-1) during any one session of dBASE.
  1469. Dice()      -- Used to simulate the roll of a dice, will handle different types
  1470.                of dice (for FRPG type games, where you have 4,6,8,10,12,20,100
  1471.                sided dice ...)
  1472.                Usage: Dice(<nSides>)
  1473. MultDice()  -- As above but for multiple die (more than one).
  1474.                Usage: MultDice(<nNum>,<nSides>)
  1475. ValiDice()  -- Asks a gamer to enter a valid die roll, GM/Programmer specifies
  1476.                # of dice, number of sides ... (i.e., 3d6 is 3 six-sided dice,
  1477.                if GM says: 3,6 the program will ask for a value from 3 to 18,
  1478.                and not allow any other input).
  1479.                Usage: ValiDice(<nNum>,<nSides>,"<cMessage>","<cColor>")
  1480. DiceChoose()-- Presents three choices (in menu format) for gamer to use, die
  1481.                dice rolls ...
  1482.                Usage: DiceChoose(<nNum>,<nSides>,"<cMessage>","<cColor>")
  1483. ParseDice() -- Used to parse character field/memvar for xdy+z format of dice
  1484.                (a standard gaming format) and evaluate the value. I.e.,
  1485.                3d6+1 = 3 six-sided dice, +1 for each die rolled, giving a
  1486.                range from 6 to 21 -- function will return random number in 
  1487.                that range (actually "rolling" 3 six-sided dice, adding 1 in
  1488.                example). 
  1489.                Usage: ParseDice("<cDiceString>")
  1490. PopDice        Used to popup a place the user can enter a quick die roll, and
  1491.                have the computer do the actual dice rolling. Handy little
  1492.                routine ...
  1493.                Usage: do PopDice with <cColor>
  1494.                Example: ON KEY LABEL ALT-D DO POPDICE WITH "rg+/rg,w+/n,rg+/rg"
  1495.  
  1496. --------------------------------------------------------------------------------
  1497. WINDOWS.PRG -- People are beginning to want things that look like MicroSoft
  1498. Windows. Here are routines that do some of that. 
  1499. --------------------------------------------------------------------------------
  1500. Alert()      -- A popup with an "OK" pad, designed to force the user to
  1501.                 acknowledge the message.
  1502.                 Usage: Alert("<cTitle>","<cMessage>")
  1503. CheckBox()   -- One line message, with a check box to change the status of
  1504.                 a logical memvar.
  1505.                 Usage: CheckBox(<lVar>,"<cTitle>",<nRow>,<nCol>,<nAscii>)
  1506. CheckBx1()   -- Same as above, but is programmed a bit differently.
  1507.                 Usage: CheckBx1(<lVar>,"<cTitle>",<nRow>,<nCol>)
  1508. DropDown()   -- Performs a picklist with an array, or a field in a database.
  1509.                 Holds a choice in a holding area, allowing user to use that,
  1510.                 or select something else.
  1511.                 Usage: DropDown("<cType>","<cName>",[<nRow,[<nCol>,[<nSize>]]])
  1512. MSWind()     -- Creates a window that acts like a "MS Windows" window, in that
  1513.                 you can move it, enlarge it to full screen, and bring it
  1514.                 back to its original size.
  1515.                 Usage: MSWind(<nTop>,<nLeft>,<nLower>,<nRight>)
  1516. Enlarge      -- Routine used with MSWIND() above to enlarge the window.
  1517.                 Usage: do Enlarge
  1518. MoveWinU     -- Routine used to Move the window (MSWIND()) up on the screen.
  1519.                 Usage: do MoveWinU
  1520. MoveWinD     -- Same as above to move window (MSWIND()) down.
  1521.                 Usage: do MoveWinD
  1522. MSWinAct     -- Used to perform action(s) inside the window (MSWIND()).
  1523.                 This routine should be modified for each specific system ...
  1524.                 This one is just a sample ...
  1525.                 Usage: do MSWinAct with <nTop>,<nLeft>
  1526. RadioBut()   -- Radio Button routine.
  1527.                 Usage: RadioBut("<cArray>",<nRow>,<nCol>,<nDefPad>,<nAscii>)
  1528. TmpRadio     -- Used to set/reset temporary array aTmpRadio used with RadioBut()
  1529.                 routine above.
  1530.                 Usage: Do TmpRadio
  1531. ScrolBar()   -- Performs a horizontal scroll-bar to find a record in a database
  1532.                 file.
  1533.                 Usage: ScrolBar(<nAtLine>)
  1534. MSWind2()    -- Acts like above, but title (due to a ... feature ... of dBASE IV
  1535.                 version 1.5) does not display if enlarged.
  1536.                 Usage: MsWind2(<nTop>,<nLeft>,<nLower>,<nRight>,"<cColor>",;
  1537.                                "<cTitle>")
  1538. Enlarge2     -- Used with MSWind2() to enlarge to full-screen.
  1539.                 Usage: do Enlarge2 with cTitle, cTitlCol
  1540. MoveWind     -- Used with MSWind2() to move the window.
  1541.                 Usage: do MoveWin with <pPad>
  1542. MSWinAt2     -- Used to perform an action inside the window from MSWind2().
  1543.                 Usage: do MSWinAt2
  1544. FieldNum()   -- Used to return the number of a given fieldname in the database
  1545.                 structure. Works only on an open database.
  1546.                 Usage: FieldNum("<cFldName>")
  1547. Alert3()     -- An enhanced version of Alert2() in PROC.PRG
  1548.                 Usage: Alert3("<cTitle>","<cMessage>","<cColor>")
  1549. YesNo3()     -- A version of YESNO() that deals with a message of up to 254
  1550.                 characters. 
  1551.                 Usage: YesNo3(<lDefault>,<cTitle>,<cMessage>,<cColor>)
  1552.  
  1553. --------------------------------------------------------------------------------
  1554. ERRLOG.PRG -- A program to hold error-handling routines for dBASE IV.
  1555. --------------------------------------------------------------------------------
  1556. ErrorLog     -- This is used to generate an errorlog for the programmer,
  1557.                 giving much vital information about the system at the time
  1558.                 a program bombed. It can print the screen to disk as well
  1559.                 as to paper, and can send a Novell Netware message to the
  1560.                 programmer as well. (If you use print screen to paper or disk,
  1561.                 you will require the use of PRINTSCR.BIN and/or SCREEN.BIN.)
  1562.                 Usage: Do ErrorLog with error(),lineno(),program(),alias(),;
  1563.                           memory()[,<lPrntScrn>[,<lScrn2Disk>[,<cNetId>]]])
  1564.  
  1565. --------------------------------------------------------------------------------
  1566. HELPROC.PRG -- A program to deal with programmer defined Help. This system 
  1567. requires the use of HELPER.DBF and HELPER.FMT. This is a "black box" routine.
  1568. Please read the instructions in HELPROC.PRG before attempting use ...
  1569. --------------------------------------------------------------------------------
  1570. Helper       -- The actual HELP program, assigned to F1 
  1571.                             (ON KEY LABEL F1 DO HELPER)
  1572. StrSrch      -- Routine to perform a string search in the help information
  1573.                 (HELPER.DBF). Uses HELPER.FMT to display information on screen.
  1574.  
  1575. --------------------------------------------------------------------------------
  1576. LISTFILE.PRG -- A program written to display an ASCII Text File on the screen.
  1577. It uses some of the low-level routines created by Adam Menkes, and a few
  1578. odd things I threw together (Ken Mayer). It is completely self-contained,
  1579. and may be copied to any directory and used ... file size read in may vary --
  1580. when using versions < 2.0 of dBASE IV, the max number of lines that can be
  1581. read in is about 1170. In 2.0 and greater, the real limit is the diskspace
  1582. you have available, but the practical limit is around 5000 lines ... you can
  1583. change this if you want to.
  1584.   USAGE: Do ListFile with <cFileName>,<nRow>,<nHeight>[,<nTabs>[,<cColors>]]
  1585. --------------------------------------------------------------------------------
  1586.  
  1587. --------------------------------------------------------------------------------
  1588. OBSOLETE.PRG -- These are functions that, due to the advent of dBASE IV, 1.5 (or
  1589. later versions), or other reasons, are no longer necessary. However, if you 
  1590. are a user of 1.1, and/or wish to still use these functions, they are still 
  1591. available, but with little support.
  1592. --------------------------------------------------------------------------------
  1593. Empty()     -- Returns a logical (.t. or .f.) if a field or memvar is empty. 
  1594.                In release 1.5 this is replaced with the internal function: 
  1595.                ISBLANK().
  1596.                Usage: Empty(<cField>)
  1597.                Recommendation: If creating a system that uses both dBASE IV
  1598.                versions 1.5 and earlier versions, rename this function to 
  1599.                ISBLANK(). If the system is an earlier version of dBASE, this
  1600.                function will be used, and if 1.5 or later, the internal function
  1601.                will be used.
  1602. NumFlds()   -- Counts the fields in a given database. This is replaced in 
  1603.                version 1.5 of dBASE IV with FLDCOUNT().
  1604.                Usage: NumFlds(<cDBF>)
  1605. DateSet()   -- Returns a string giving name of current DATE format.
  1606.                Usage: DateSet()
  1607. StampVal()  -- Evaluates a 16-character string in the form of the rightmost 
  1608.                16 characters returned by the DOS DIR command for a file.
  1609.                Usage: StampVal(<cTimeStamp>)
  1610. FullWin     -- Handy to overlay a screen with a full-screen window ...
  1611.                Usage: do FullWin with "<cColor>","<cWinName>","<cScreen>"
  1612. SetColor    -- used to set a memory file with colors, or load colors into
  1613.                memory variables from a memory file.
  1614.                Usage: do SetColor
  1615. SetColor2   -- used to set a mem file as above, but asks for a parameter to
  1616.                be sent, so that when designing a system, you can ask the
  1617.                user if their monitor is color or mono ... you pass "Y" or
  1618.                "N" ... i.e.,
  1619.                Usage: do SetColor2 with "<cYN>"
  1620. ExtrClr()   -- Used to extract the first parameter of a color memory variable.
  1621.                Usage: ExtrClr(<cColorVar>)
  1622. InvClr()    -- Can invert the colors of a color memory variable.
  1623.                Usage: InvClr(<cColorVar>)
  1624. RAt()       -- Reverse AT() - returns position of a character string in its  
  1625.                last position in a larger string ... Replaced in Version 2.0
  1626.                with internal function: RAt().
  1627.                Usage: RAt(<cFindStr>,<cBigStr>)
  1628. IsMouse()   -- Looks at system for a mouse driver, if there, it turns off
  1629.                the mouse. Uses JPMOUSE.BIN. Replaced in Version 2.0 with 
  1630.                the internal function: ISMOUSE().
  1631.                Usage: IsMouse()
  1632. SetMouse    -- Used to toggle a mouse, requires JPMOUSE.BIN and a public
  1633.                memvar c_Mouse set to the most current state ("OFF" means
  1634.                the mouse is "OFF" ... and will be toggled ON in the next
  1635.                call to SetMouse). Replaced in Version 2.0 with SET MOUSE
  1636.                ON|OFF.
  1637.                Usage: On Key label ... DO SetMouse
  1638. IsUnique()  -- Used to check a keyfield in a database to see if it's unique.
  1639.                NOTE: do not use in dBASE IV, versions > 1.1
  1640.                Usage: IsUnique(<xValue>,<cOrder>)
  1641.  
  1642. ================================================================================
  1643. Enjoy. Happy computing. 
  1644.  
  1645. KJM
  1646. --------------------------------------------------------------------------------
  1647. -- EoF: README.TXT
  1648. --------------------------------------------------------------------------------
  1649.