home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / xbase / library / dbase / duflp / readme.txt < prev    next >
Text File  |  1992-07-24  |  58KB  |  1,110 lines

  1. ===============================================================================
  2.                                 README.TXT
  3.                     For the dUFLP LIBRARY Files (attached)
  4.                (dUFLP = dBASE User's Function Library Project)
  5.                                Version 1.7
  6.                                  07/24/92
  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. There are a lot of good people using this board, both as sysops/sigops,
  14. and as users, and I have learned alot about dBASE IV Programming from these
  15. 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 seperate (or in this PROC file) with your systems,
  21. that you include ALL the documentation, including (ESPECIALLY) the name of 
  22. the programmer. 
  23.  
  24. SPECIAL THANKS: To Jay Parsons (JPARSONS), 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 integrety and consistency in this system.
  27.  
  28. RELATED FILES/PROGRAMS ON THE BORLAND BBS:
  29. dHUNG2.ZIP   -- a file containing the description of the dBASE User's Function
  30.                 Library Project standards (dUFLP) which are used in these 
  31.                 programs.
  32. PROCLT20.ZIP -- A program that was created to grab the procedures and functions
  33.                 in use from PROC.PRG and add them to specific programs, 
  34.                 so that when developing a system you do not need to ship PROC
  35.                 with it (which is, after all, rather huge). (Check for the
  36.                 latest version on the BBS. This has been written by Dave
  37.                 Altsol (ALTSOL) completely independant of the work done on
  38.                 these libraries ...)
  39. JPDATES.ZIP  -- A text file with most of Jay Parsons' (JPARSONS) Date handling 
  40.                 routines, including explanations of the logic behind ones like 
  41.                 the EASTER() function (which is difficult to follow, even WITH
  42.                 Jay's explanations!).
  43. MARIAN.ZIP   -- Marian the Librarian -- a routine by Jay Parsons (JPARSONS) 
  44.                 designed to help keep the whole library of functions and
  45.                 procedures under control -- watch for it.
  46.  
  47. This is a set of dynamic files -- they're always changing. Please feel free to 
  48. send me comments and/or suggestions on ways to better it (which includes both 
  49. functions and procedures, and suggestions to make the ones here better). I can 
  50. be reached on Electronic Services: 
  51.  
  52. BORBBS: KenMayer  
  53. CompuServe: 71043,3232
  54.  
  55. or at home at:
  56.  
  57.    Ken Mayer
  58.    2308 Alva Avenue
  59.    El Cerrito, CA 94530
  60.    (510) 215-5879 (Home)
  61.  
  62. ==========
  63. DISCLAIMER
  64. ==========
  65. No guarantees are given. Last attempted, all these routines worked. I take no
  66. responsibility for their use, particularly if something happens to your data.
  67.  
  68. ========
  69. PROBLEMS
  70. ========
  71. Problems with individual procedures and functions should be addressed, if 
  72. possible, to the author (note the 'Programmer' listed in the first line of
  73. the internal documentation for each routine). If you cannot reach them, contact
  74. me at my id on the BBS, and I will see what I can do.
  75.  
  76. ============
  77. INSTRUCTIONS
  78. ============
  79. ---------------------------
  80. dBASE IV, version 1.5 users
  81. ---------------------------
  82. In order to use these, you need to understand (and this is brief) how dBASE IV,
  83. version 1.5 uses functions and libraries. Basically, it follows a 'search path'
  84. based on your programs and files, as well as its own internal functions.
  85. dBASE starts at the top of the following list, and if it cannot find the 
  86. function or procedure named in your program, it goes to the next item in the 
  87. list until it either finds it, or doesn't find it, as the case may be. If not,
  88. you will get the dBASE error message about not finding a function.
  89.  
  90. 1)  dBASE INTERNAL FUNCTIONS AND COMMANDS
  91. 2)  SYSPROC = "System Procedure Filename"
  92. 3)  Current Program (the one executing at that time)
  93. 4)  SET PROCEDURE TO <proc name>
  94. 5)  Calling Program (a main menu program, for example)
  95. 6)  SET LIBRARY TO <library name>
  96.  
  97. To use these files in dBASE IV, version 1.5, you should something along
  98. the following lines as a layout: 
  99.  
  100.    For any procedures/functions that are required specifically for your
  101.    system, and no other, place those in your own procedure file, and
  102.    refer to that in the SYSPROC command in your CONFIG.DB file. Example:
  103.  
  104.    SYSPROC = MYPROC
  105.  
  106.    To use the 'standard' library file for this system, in your main program 
  107.    (by 'main program' we could be discussing a MENU program, or other front-
  108.    end program) put the command:
  109.  
  110.    SET PROCEDURE TO PROC  && or point to the appropriate directory
  111.    
  112.    And in the appropriate programs, or where needed,
  113.  
  114.    SET LIBRARY TO <library file> && based on those below
  115.  
  116. This is just one method of handling this. One thing that can make life easier,
  117. if you switch LIBRARY files a lot, is the dBASE IV, 1.5 option to the SET
  118. command:  SET("LIBRARY"). This can be used in the following manner:
  119.  
  120.     cLibrary = set("LIBRARY")  && save current library name
  121.     set library to NEWLIB      && set new one
  122.     *-- do function/procedure calls from new library
  123.     set library to &cLibrary   && return to previous library file
  124.  
  125.      OR you could use the new function SwitchLib():
  126.  
  127.     cOldLib = switchlib("FILES")
  128.     *-- execute function/procedure
  129.     cOldLib = switchlib("&cOldLib")
  130.  
  131. SUGGESTION: If you store your copy of the LIBRARY files (and PROC) in another
  132. directory on the drive, you might want to define a public memvar called
  133. something like:  c_LibPath and store the path in in. This way you can
  134. use that with your routines to call the libraries. Something along the following
  135. could be useful:
  136.  
  137. PUBLIC c_LibPath
  138. Store "C:\DBFILES\PROC\" to c_LibPath
  139.   *-- processing
  140. cOldLib = SwitchLib("&c_LibPath.FILES")  && send with path, as well as filename
  141. *-- execute function/procedure
  142. cOldLib = SwitchLib("&cOldLib")          && should return path
  143.  
  144. This will make it easier to update if you are setting this up for a client --
  145. you can change the c_LibPath variable in the setup or menu program ONCE, and
  146. not have to worry about it again.
  147.  
  148. NOTE: that in some of the library files there are functions which require 
  149. the use of functions in OTHER files (i.e., some functions in NAVIGATE use 
  150. some functions that are in TRIG). I have attempted to ensure that I have copied
  151. INTO those library files the appropriate functions, so you don't spend too much
  152. time tearing your hair out.
  153.  
  154. -------------------
  155. dBASE IV, 1.1 Users
  156. -------------------
  157. To use these procedure files in their entirety, use the DOS Copy command to 
  158. concatenate the library files to the PROC file. Something along the following
  159. lines (although you should check to make sure you have all the files):
  160.  
  161. COPY PROC.PRG+SCREEN.PRG+COLOR.PRG+TRIG.PRG+CONVERT.PRG+ <etc.>
  162.  
  163. You should note that in some of the library files, there are duplicated 
  164. functions used, due to the fact that some users in 1.5 might wish to only use
  165. one or two of the library files. You can also use just the individual library
  166. files in your SET PROCEDURE command, if you wish. 
  167.  
  168. Add to your programs (a menu or startup routine is one of the best places) 
  169. the line:
  170.  
  171. SET PROCEDURE TO PROC
  172.  
  173. To use individual routines, rather than the whole library, extract them using 
  174. your favorite ASCII editor, or remove the routines from this file (you might 
  175. want to copy it first) that you do not feel you will need.
  176.  
  177. ================================================================================
  178. WHAT'S HERE?
  179. ================================================================================
  180.  
  181. Some of the changes made may feel a bit arbitrary -- they are. These decisions
  182. were made based on the functions/procedures I use the most in my own routines.
  183. Since the original purpose of this library was my own use, I felt it my
  184. prerogative to be the one to make the final decision as to what routines were
  185. left in PROC.PRG, and which got moved to the LIBRARY files. 
  186.  
  187. Included in this LIBRARY System are the following files:
  188.  
  189. Text Files
  190. README.TXT   -- You're looking at it.
  191. WHATS.NEW    -- This is a description of the new features for this system.
  192. CONTRIB.TXT  -- How to contribute to the Library Project.
  193. JPMOUSE.TXT  -- An explanation from Jay on the JPMOUSE.BIN file, attached
  194.                 (with his permission). See also the function ISMOUSE() and
  195.                 procedure file SETMOUSE in PROC.PRG.
  196. DISK.TXT     -- A very brief discussion on the use of DISK.BIN.
  197. SEARCH.TXT   -- A very brief discussion on the use of SEARCH.BIN.
  198.  
  199. Procedure and Library Files -- Described Below
  200. ARRAY.PRG
  201. COLOR.PRG
  202. CONVERT.PRG
  203. DATES.PRG
  204. FIELDS.PRG
  205. FILES.PRG
  206. FINANCE.PRG
  207. FRPG.PRG
  208. MEASURE.PRG
  209. MISC.PRG
  210. NAVIGATE.PRG
  211. OBSOLETE.PRG
  212. PROC.PRG
  213. SCA.PRG
  214. SCREEN.PRG
  215. STATS.PRG
  216. STRINGS.PRG
  217. TIME.PRG
  218. TRIG.PRG
  219.  
  220. BIN Files -- used in routines attached.
  221. JPMOUSE.BIN
  222. DISK.BIN
  223. SEARCH.BIN
  224.  
  225. Below is a quick list of all the procedures and functions included in the 
  226. library files in the sequence they are presented in the programs themselves:
  227.  
  228. ===================================
  229. PROC.PRG -- The MAIN PROCEDURE File
  230. ===================================
  231.  
  232. ----------------------------------
  233. MESSAGE/SCREEN PROCESSING ROUTINES
  234. ----------------------------------
  235. PrintErr    -- used to display a "standard" error message for printer 
  236.                errors (is it on, online, out of paper?).
  237.                Usage: do PrintErr
  238. Open_Screen -- Used to add texture to the background for an opening screen or
  239.                menu.
  240.                Usage: do Open_Screen
  241. JazClear    -- performs a nice center to edge of screen clear (using a box) ...
  242.                Usage: do JazClear
  243. Wipe        -- performs a left-to-right wipe of a window. Nice effect.
  244.                Usage: do Wipe with <nULRow>,<nULCol>,<nBRRow>,<nBRCol>
  245. Center      -- used to center text anywhere on the screen (optional colors).
  246.                Usage: do Center with <nRow>,<nWidth>,"<cColors>","<cText>"
  247. Surround()  -- Used to display text at X,Y position, surrounded with a double-
  248.                line box.
  249.                Usage: Surround(<nRow>,<nCol>,"<cColor>","<cText>")
  250. Message1()  -- Displays a single-line message, waits for user to press a key
  251.                before program moves on.
  252.                Usage: Message1(<nRow>,<nWidth>,"<cColor>","<cText>")
  253. Message2()  -- Same as above, but displays message in a window (with shadow).
  254.                Usage: Message2("<cText>","<cColor>")
  255. Message3()  -- Same as above, but will handle LONG messages, wrapping inside
  256.                window.
  257.                Usage: Message3("<cText>","<cColor>")
  258. Message4()  -- 2-Line message in a window, pauses for user.
  259.                Usage: Message4("<cText1>","<cText2>","<cColor>")
  260. Monitor     -- Displays a box, showing total records in database -- is designed
  261.                to be used in a system that does a record-by-record update, 
  262.                so the user knows something is happening. You need to add code
  263.                to display actual record numbers as the task is happening.
  264.                Usage: do Monitor with "<cText>","<cColors>"
  265. Monitoroff  -- Cleanup for Monitor procedure above.
  266.                Usage: do MonitorOff
  267. ScrnHead()  -- Used to display a screen header inside a box (with a shadow).
  268.                Usage: ScrnHead("<cColor>","<cText>")
  269. YesNo()     -- Used to ask a "yes/no" type question, allows three lines of 
  270.                message, and uses menu pads to choose (move cursor, press 
  271.                <enter>).
  272.                Usage: YesNo(<lAnswer>,"<cMess1>","<cMess2>","<cMess3>",;
  273.                              "<cColors>")
  274. YesNo2()    -- As above, but allows programmer to choose position on screen.
  275.                Usage: YesNo2(<lAnswer>,"<cWhere>","<cMess1>","<cMess2>",;
  276.                            "<cMess3>","<cColors>")
  277.                    where cWhere may be one of the following:
  278.                          UL = Upper Left
  279.                          UC = Upper Center
  280.                          UR = Upper Right
  281.                          CL = Center Left
  282.                          CC = Center Center
  283.                          CR = Center Right
  284.                          BL = Bottom Left
  285.                          BC = Bottom Center
  286.                          BR = Bottom Right
  287.                    Anything else will default to CC.
  288. ErrorMsg()  -- Allows 2 lines of message, first is ** ERROR **, or optionally,
  289.                ** ERROR # **  where '#' is a number (if "<cErr>" is empty,
  290.                (""), system uses first option, but there must be SOMETHING
  291.                there). 
  292.                Usage: ErrorMsg("<cErr>","<cMess1>","<cMess2>","<cColors>")
  293. Shadow      -- Used for windows/boxes to display a shadow, giving 3-D effect.
  294.                Usage: do Shadow with <nULRow>,<nULCol>,<nBRRow>,<nBRCol>
  295. VPick()     -- Multiple-item Picklist -- this routine will allow you to create
  296.                a simple vertical picklist of items, returning the first letter 
  297.                of the option selected, or a null string if the user pressed 
  298.                <Esc>.
  299.                Usage: VPick(<nRow>,<nCol>,"<~Option1~Option2~Option3>",;
  300.                              "<cTitle>","<cMessage>",<lShadow>,<cColor>)
  301. HPick()     -- Very much like VPICK() above, but does a Horizontal Picklist.
  302.                Usage: HPick(<nRow>,<nCol>,"<~Option1~Option2~Option3>",;
  303.                              "<cTitle>","<cMessage>",<lShadow>,<cColor>)
  304.  
  305. -------------------------
  306. COLOR PROCESSING ROUTINES
  307. -------------------------
  308. SetColor    -- Sets colors to contents of a memvar to handle various parts of
  309.                the screen. THIS IS A NEW ROUTINE -- USERS OF THE OLD 
  310.                SETCOLOR and SETCOLOR2 ROUTINES SHOULD CHECK "OBSOLETE.PRG".
  311.                Usage: do SetColor with <cColorVar>
  312. ReColor     -- Restores colors to those held in a string of the form returned
  313.                by SET("ATTRIBUTE").
  314.                Usage: Do ReColor with <cColors>
  315. ColorBrk()  -- Returns one of three portions of a color variable as used in
  316.                many of my own routines (YESNO, etc.). Used for explicitly
  317.                setting colors.
  318.                Usage: ColorBrk(<cColorVar>,<nField>)
  319.  
  320. ----------------------------
  321. STRING MANIPULATION ROUTINES
  322. ----------------------------
  323. AllTrim()   -- Trims both sides of a character field/memvar.
  324.                Usage: AllTrim(<cString>)
  325. State()     -- This is used for validation of a STATE (two letter) code ... 
  326.                (returns .t. or .f.) -- useful for data entry.
  327.                Usage: State(<cState>)
  328.  
  329. ----------------------
  330. DATE HANDLING ROUTINES
  331. ----------------------
  332. DateText()  -- Convert date to Month Day, Year format.
  333.                Usage: DateText(<dDate>)
  334. DateText2() -- As above, adds day of week (DoW, Month Day, Year).
  335.                Usage: DateText2(<dDate>)
  336. Age()       -- Returns the age of someone as of DATE(), given their birthdate.
  337.                Usage: Age(<dDate>)
  338.  
  339. -----------------------
  340. FIELD HANDLING ROUTINES
  341. -----------------------
  342. IsUnique()  -- Used to check a keyfield in a database to see if it's unique.
  343.                Usage: IsUnique(<xValue>,<cOrder>)
  344.  
  345. --------------
  346. MISC. ROUTINES
  347. --------------
  348. SetPrint    -- Used to setup the printer memory variables for a print job.
  349.                Usage: do SetPrint
  350. DosRun()    -- Used to execute a DOS command/program from inside dBASE, handles
  351.                windows and such by restoring them when done.
  352.                Usage: DosRun(<cCmd>)
  353. ScrnRpt()   -- Shows a dBASE Report on screen, and pauses when the screen is
  354.                full.
  355.                Usage: ScrnRpt(<cRpt>)
  356. SwitchLib() -- Changes the current library file to another. Useful when doing
  357.                quick changes to execute a function/file in another library.
  358.                Usage: SwitchLib(<cNewLib>)
  359. IsMouse()   -- Looks at system for a mouse driver, if there, it turns off
  360.                the mouse. Uses JPMOUSE.BIN.
  361.                Usage: IsMouse()
  362. SetMouse    -- Used to toggle a mouse, requires JPMOUSE.BIN and a public
  363.                memvar c_Mouse set to the most current state ("OFF" means
  364.                the mouse is "OFF" ... and will be toggled ON in the next
  365.                call to SetMouse).
  366.                Usage: On Key label ... DO SetMouse
  367. VerLevel()  -- Used to return numeric value of current version of dBASE or
  368.                RUNTIME. Useful with those version specific routines.
  369.                Usage: VerLevel()
  370.  
  371. =============
  372. LIBRARY FILES
  373. =============
  374.  
  375. The following files are the 'library' files that contain all routines in this
  376. system not contained in PROC.PRG. See the section of this document marked
  377. 'INSTRUCTIONS' for how to use these. Please notice that some functions which
  378. are used in specific LIBRARY files (such as NAVIGATE.PRG, which uses some of
  379. the functions in TRIG.PRG) are duplicated in some of the other library files.
  380. This was done to make life easier on the programmer. Since dBASE IV, 1.5 does
  381. not allow multiple library files (although one can hope for such a feature in
  382. future editions), we are stuck having to duplicate some routines.
  383.  
  384. -----------------------------
  385. SCREEN.PRG -- Screen Handling
  386. -----------------------------
  387. Radio()     -- This routine creates a "radio-button" routine. You can have
  388.                up to four options. Returns # of item chosen ...
  389.                Usage: Radio(<nULRow>,<nULCol>,<nChoice>,"<cTxt1>","<cTxt2>",;
  390.                              "<cTxt3>","<cTxt4>","<cTitle>","<cColor>")
  391. CheckBox    -- This routine does a "CheckBox" much like Windows/Mac type
  392.                software, with up to four options. NOTE -- the items marked
  393.                in the format must be a) logical, and b) fields/memvars.
  394.                They cannot be literal values, due to limitations of dBASE
  395.                parameter handling.
  396.                Usage: Do CheckBox with <nULRow>,<nULCol>,<lChk1>,<lChk2>,;
  397.                                         <lChk3>,<lChk4>,"<cTxt1>",;
  398.                                         "<cTxt2>","<cTxt3>","<cTxt4>",;
  399.                                         "<cTxt0>","<cColor>"
  400. MenuPad()   -- Used to define menu pad and popup bars as a specific length.
  401.                Function will truncate if longer than needed, and will
  402.                pad with spaces otherwise.
  403.                Usage: MenuPad("<nChoice>",<nLength>)
  404. Banner()    -- Used to display a scrolling "banner" message on the screen.
  405.                Usage: Banner(<nRow>,<nCol>,<nwidth>,"<cMessage>","<cColor>")
  406. SeeMatch()  -- Displays instant lookup match on a field in a shadowed box.
  407.                Usage: SeeMatch("<cFile>",<cSeekExp>,"<cReturn>",<nULRow>,;
  408.                                <nULCol>,<nBRRow>,<nBRCol>,"<cColor>")
  409. MsgExp()    -- Used to display a message (or an error message), centered on
  410.                the screen. Does not use the "(Press Space)" bits that dBASE
  411.                uses on an error message ... The message and the line on which
  412.                it is displayed will be the same color.
  413.                Usage: MsgExp("<cExp>")
  414. Dialog()    -- Routine to provide a 'standard' set of dialog boxes and buttons
  415.                for all applications. 
  416.                Usage: Dialog("<cMsg>",<nType>,"<cBorder>",<nDefBut>,<lShadow>,;
  417.                              "<cWind>","<cButton>")
  418.                nType is used to describe the dialog box type, options are:
  419.                0:      'OK'
  420.                1: 'OK' 'CANCEL'
  421.                2: 'ABORT'  'RETRY'  'IGNORE'
  422.                3: 'YES'  'NO'   'CANCEL'
  423.                4: 'YES'  'NO'
  424.                5: 'RETRY'   'CANCEL'
  425. Pick2()     -- This picklist routine creates a picklist that determines it's
  426.                own location on the screen by calling a couple of other functions
  427.                (below).
  428.                Usage: Pick2("<cLookFile>","<cTag>","<cSrchFld>","cRetFld>",;
  429.                             <nScrRow>,<nScrCol>)
  430. ScrRow()    -- Returns the row position of the current 'Get'. If the memvar
  431.                nScrRow already exists, it returns the value in that memvar.
  432.                Usage: ScrRow()
  433. ScrCol()    -- Returns the column position of the current 'Get'. Works like 
  434.                above, but for column.
  435.                Usage: ScrCol()
  436. YesNoCan()  -- A dialog box, defaults to 'Yes/No/Cancel', varies in size,
  437.                depending on programmer needs, optional row position. Nice
  438.                modification of the YESNO() function in PROC.PRG.
  439.                Usage: YesNoCan("<cAnswer>","<cMess1>","<cMess2>","<cMess3>",;
  440.                                "<cPrompt1>","<cPrompt2>","<cPrompt3>",;
  441.                                <nTopRow>,"<cColor>")
  442. ProgBar     -- Monitor program activity, so user does not get worried that
  443.                the machine went into limbo. A graphic version of what the
  444.                "MONITOR" procedure in PROC.PRG does.
  445.                Usage: Do ProgBar with <nQuan>,"<cWindCol>","<cFillCol1>",;
  446.                                  "<cFillCol2>","<cMessage>",<nWindWidth>
  447. ProgBar2    -- Same as above, but a bit simpler to use.
  448.                Usage: Do ProgBar2 with <nQuan>,"<cWindCol>","<cFillCol2>",;
  449.                                  "<cFillCol2>"
  450.  
  451. -----------------------------
  452. COLOR.PRG -- Color Processing
  453. -----------------------------
  454. AttriByte() -- Returns the attribute byte of a dBASE Color code.
  455.                Usage: AttriByte("<cCode>")
  456. ColorName() -- Converts an attribute value for an area to the name of the
  457.                corresponding color combination. 
  458.                Usage: ColorName(<nAttr>)
  459. ColorCode() -- Given a color attribute byte, returns dBASE color code.
  460.                Usage: ColorCode(<nAttr>)
  461. ColorOf()   -- Returns the color of attributes in dBASE, as currently set.
  462.                Usage: ColorOf("<cArea>")
  463.  
  464. ------------------------------------------
  465. STRINGS.PRG -- Character String Processing
  466. ------------------------------------------
  467. Proper()    -- Converts text to "proper" case (upper/lower case, handles
  468.                contractions, Mc, Mac, etc.). Useful for names (converts first
  469.                letter to upper case, the rest to lower, except as above).
  470.                Usage: Proper("<cArg>")
  471. Justify()   -- Used to justify a field or memvar (or character expression) 
  472.                within a specific field width. 
  473.                Usage: Justify(<cFld>,<nLength>,"<cType>")
  474.                    cType must be L (left), C (center), or R (right)
  475. Dots()      -- Used to pad a field with dots (dot leader, trailer ...) 
  476.                Usage: Dots(<cFld>,<nLength>,"<cType>")
  477.                    cType must be L (left), C (center), or R (right)
  478. CutPaste()  -- Used to Cut a string and Paste another in it's place. It's
  479.                an easier way to use the STUFF() function.
  480.                Usage: CutPaste(<cFld>,<cLookFor>,<cRepWith>)
  481. LastWord()  -- Used to return the last "word" of a string of characters (words
  482.                being bracketed by spaces).
  483.                Usage: LastWord(<cString>)
  484. VStretch()  -- Displays a long character field (254 char) on screen, with
  485.                wrap-around, and handles proper word-breaks - you give
  486.                dimensions for where you want it displayed (window).
  487.                Usage: VStretch(<cFld>,<nULRow>,<nULCol>,<nBRRow>,<nBRCol>)
  488. AtCount()   -- Returns the number of times a string is found in another.
  489.                Usage: AtCount(<cFindStr>,<cBigStr>)
  490. IsAlNum()   -- If first character of string is alphabetic or digit, returns
  491.                .t., otherwise returns .f..
  492.                Usage: IsAlNum(<cChar>)
  493. IsAscii()   -- If first character is in ASCII (normal, not extended) character
  494.                set, returns .t., otherwise returns .f..
  495.                Usage: IsAscii(<cChar>)
  496. IsCntrl()   -- If first character is a delete or control character, returns
  497.                .t., otherwise returns .f..
  498.                Usage: IsCntrl(<cChar>)
  499. IsDigit()   -- If first character is a digit, returns .t..
  500.                Usage: IsDigit(<cChar>)
  501. IsPrint()   -- If first character is a printing character (space through
  502.                chr(126), returns .t..
  503.                Usage: IsPrint(<cChar>)
  504. IsXDigit()  -- If first character is possible hexadecimal digit, returns .t..
  505.                Usage: IsXDigit(<cChar>)
  506. IsSpace()   -- Returns .t. if first character is space, tab, carriage return,
  507.                line feed, vertical tab, or formfeed.
  508.                Usage: IsSpace(<cChar>)
  509. Name2Label()-- Returns a name held in five fields as a single field for the
  510.                purpose of printing in a label.
  511.                Usage: Name2Label(<nLength>,<cPrefix>,<cFirstName>,;
  512.                                   <cMidName>,<cLastName>,<cSuffix>)
  513. StrpBrk()   -- Search string for first occurrence of any specific character(s).
  514.                Usage: StrpBrk(<cCharSet>,<cBigStr>)
  515. RAt()       -- Reverse AT() - returns position of a character string in its  
  516.                last position in a larger string ...
  517.                Usage: RAt(<cFindStr>,<cBigStr>)
  518. StrRev()    -- Reverse a string.
  519.                Usage: StrRev(<cAnyStr>)
  520. Strip2Val() -- Strip characters from the left until reaching one that might
  521.                begin a numeric value ...
  522.                Usage: Strip2Val(<cString>)
  523. StripVal()  -- Strip characters until reaching one that is NOT part of a
  524.                number.
  525.                Usage: StripVal(<cString>)
  526. ParseWord() -- Finds first word in a character string.
  527.                Usage: ParseWord(<cW>)
  528. StripWord() -- Removes first word in character string.
  529.                Usage: StripWord(<cW>)
  530.  
  531. -----------------------------------------------
  532. CONVERT.PRG -- Numeric Conversions/calculations
  533. -----------------------------------------------
  534. Roman()     -- Function to return a Roman Numeral based on input of an Arabic.
  535.                Usage: Roman(<nArabic>)
  536. Arabic()    -- Opposite of Roman (takes Roman Numeral provided, returns
  537.                Arabic).
  538.                Usage: Arabic("<cRoman>")
  539. Factorial() -- Does what it sounds like, it returns the factorial of a value.
  540.                Usage: Factorial(<nNumber>)
  541. IsPrime()   -- Determines if the argument passed is a prime positive integer.
  542.                Usage: IsPrime(<nNumber>)
  543. BankRound() -- Rounds numeric argument to given # of places using "Banker's 
  544.                rule."
  545.                Usage: BankRound(<nNumber>,<nPlaces>)
  546. Num2Str()   -- Number to String, uses ASCII 1/2 and 1/4 instead of decimals
  547.                where appropriate.
  548.                Usage: Num2Str(<nNumber>)
  549. Dec2Hex()   -- Decimal to Hexadecimal conversion.
  550.                Usage: Dec2Hex(<nDecimal>)
  551. Hex2Dec()   -- Hexadecimal to Decimal conversion.
  552.                Usage: Hex2Dec(<cHex>)
  553. Hex2Bin()   -- Hexadecimal to Binary conversion.
  554.                Usage: Hex2Bin(<cHex>)
  555. Bin2Hex()   -- Binary to Hexadecimal conversion.
  556.                Usage: Bin2Hex(<cBin>)
  557. Dec2Oct()   -- Decimal to Octal conversion.
  558.                Usage: Dec2Oct(<nDec>)
  559. Oct2Dec()   -- Octal to Decimal conversion.
  560.                Usage: Oct2Dec(<xOct>)
  561. Cash2Check()-- Converts a number of dollars and cents to a string of words.
  562.                Usage: Cash2Check(<nCash>)
  563. Num2Words() -- Converts an integer to a string of words.
  564.                Usage: Num2Words(<nNum>)
  565. Thou2Words()-- Converts a positive integer less than 1000 to a string of words.
  566.                Usage: Thou2Words(<nNum>)
  567. Ord()       -- Converts an integer to ordinal representation.
  568.                Usage: Ord(<nNum>)
  569. Num2Word()  -- Converts an integer to a string of words -- self-contained
  570.                function, does not call other functions. 
  571.                Usage: Num2Word(<nValue>)
  572. Num2Real()  -- Converts a number to the ASCII representation of its storage in
  573.                IEEE 8-byte real format.
  574.                Usage: Num2Real(<nNum>,<nExp>)
  575. Dec2Bin()   -- Decimal to Binary conversion.
  576.                Usage: Dec2Bin(<nNum>,<nPlaces>)
  577. Frac2Bin()  -- Converts the fractional part of a decimal number to a
  578.                character string giving its ASCII binary representation.
  579.                Usage: Frac2Bin(<nNum>,<nPlaces>)
  580.  
  581. -----------------------------------
  582. DATES.PRG -- Date Handling Routines
  583. -----------------------------------
  584. DateText3() -- As DateText() and DateText2() in PROC.PRG, returns: Month, Year.
  585.                Usage: DateText3(<dDate>)
  586. Age2()      -- Returns age of someone on the date of a specific event.
  587.                Usage: Age2(<dDate>,<dEvent>)
  588. Annivrsry() -- Checks to see if a birthday or other specific "anniversary" is 
  589.                within a range of dates.
  590.                Usage: Annivrsry(<dTest>,<dBegin>,<dEnd>)
  591. AddMonths() -- Returns the exact date 'N' months from give date.
  592.                Usage: AddMonths(<dDate>,<nMonths>)
  593. AddYears()  -- Returns the exact date 'N' Years from given date.
  594.                Usage: AddYears(<dDate>,<nYears>)
  595. IsLeap()    -- Returns .t./.f. if year is a leap year... (year in YY or YYYY
  596.                formats)
  597.                Usage: IsLeap(<nYear>)
  598. DoY()       -- Day of Year -- returns "Julian" date (US Government version ...)
  599.                -- this is the number of days a date is from January 1 of that
  600.                year (i.e., 11/14/91 = 318).
  601.                Usage: DoY(<dDate>)
  602. WeekNo()    -- Returns the week number of the date (there are 52 weeks a year,
  603.                right?). 
  604.                Usage: WeekNo(<dDate>)
  605. Holiday()   -- Returns the date of specific "floating" holidays for a given
  606.                year, requires a one-letter code. See full doc in proc.prg.
  607.                Usage: Holiday(<nYear>,<cCode>)
  608.                Where cCode may be one of the following:
  609.                      P = President's Day
  610.                      D = Daylight Saving Time
  611.                      M = Memorial Day
  612.                      L = Labor Day
  613.                      C = Columbus Day
  614.                      S = Return to "Standard" Time
  615.                      E = Election Day
  616.                      T = Thanksgiving Day
  617.                      A = Advent 1st Sunday
  618. EasterDay() -- This returns the day of Easter. It doesn't work as easily as
  619.                those dates given above, so has it's own function.
  620.                Usage: EasterDay(<nYear>) && nYear = YYYY format
  621. nDoW()      -- Numeric Day of Week -- used to return the numeric value of a 
  622.                character day of the week, useful for some of the revised
  623.                functions below.
  624.                Usage: nDoW(<cDay>)
  625. FWDoM()     -- First Working Day Of the Month -- this returns the first working
  626.                day of the month passed to the function.
  627.                Usage: FWDoM(<dDate>)
  628. LWDoM()     -- Last Working Day Of the Month --  returns the last working day
  629.                of the month passed to the function.
  630.                Usage: LWDoM(<dDate>)
  631. FDoD()      -- First Day of Date -- this returns the first occurrence of a given
  632.                day of the week within a month. For example, you might need the
  633.                first Monday of the month. 
  634.                Usage: FDoD(<dDate>,"<cDay>")  (cDay = Monday, Tuesday, etc.)
  635. LDoD()      -- Last Day of Date -- This returns the last occurrence of a given
  636.                day of the week within a month. For example, you might need the 
  637.                last Monday in a month.
  638.                Usage: LDoD(<dDate>,"<cDay>")
  639. LDoM()      -- Last Day of Month -- this returns the last day of the month
  640.                as a date. It's used in LDoD and LWDoM above.
  641.                Usage: LDoM(<dDate>)
  642. NumDoD()    -- Number of Day of Date -- this returns a specific occurrence of a
  643.                given day of the week within a month. For example, you might need
  644.                the 3rd Tuesday of the month.
  645.                Usage: NumDoD(<dDate>,<nDay>,"<cDay>")
  646. WDIF()      -- Work Days In the Future -- this is used to return the date based
  647.                on a number of work-days from another date. For example, you 
  648.                could find the date of the 10th work date from today (date())
  649.                by using date(),10 as the parameters in the format below. This
  650.                function can use a HOLIDAYS database to be more accurate, but
  651.                you must create it in a specific format (see complete function 
  652.                documentation in the file DATES.PRG).
  653.                Usage: WDiF(<dStart>,nWDays)
  654. StoD()      -- String to Date -- this returns a "normal" dBASE date from a
  655.                character string containing formats of YYYYMMDD or YYMMDD.
  656.                Usage: StoD("<cString>")
  657. Quarter()   -- This function returns the "Quarter" of the year that a specified
  658.                date is in ...
  659.                Usage: Quarter(<dDate>)
  660. Dat2Jul()   -- Convert dBASE date to Julian date
  661.                Usage: Dat2Jul(<dDate>)
  662. Jul2Dat()   -- Convert Julian date to dBASE date
  663.                Usage: Jul2Dat(<nJulian>)
  664. FrstNxtMth()-- Returns the first day of next month, given a date in 'current'
  665.                month.
  666.                Usage: FrstNxtMth(<dDate>)
  667.  
  668. ---------------------------------
  669. TIME.PRG Time Processing Routines
  670. ---------------------------------
  671. Delay()     -- Delay loop in seconds.
  672.                Usage: Delay(<nSeconds>)
  673. Time2Sec()  -- Convert time string to seconds.
  674.                Usage: Time2Sec(<cTime>)
  675. Sec2Time()  -- Convert seconds to time string.
  676.                Usage: Sec2Time(<nSeconds>)
  677. DiffTime()  -- Calculate difference btween two time strings.
  678.                Usage: DiffTime(<cTime1>,<cTime2>)
  679. Civ2Mil()   -- Convert civilian time string (i.e., "12:59 A.M.") to 24 hour
  680.                (military) time.
  681.                Usage: Civ2Mil(<cCivilTime>)
  682. Mil2Civ()   -- Convert military (24 hour) time to Civilian time.
  683.                Usage: Mil2Civ(<cMilTime>)
  684.  
  685. --------------------------------
  686. FINANCE.PRG -- Finance Functions
  687. --------------------------------
  688. Discount()  -- Compute the present value of an amount received at the end of
  689.                a number of periods given a periodic interest rate.
  690.                Usage: Discount(<nFuturVal>,<nRate>,<nPeriods>)
  691. FuturVal()  -- Compute the future value of an initial amount at compound
  692.                interest received at a given periodic rate for a number of 
  693.                periods.
  694.                Usage: FuturVal(<nPresVal>,<nRate>,<nPeriods>)
  695. Rate()      -- Compute rate of periodic interest needed to produce a future
  696.                value from a present value in a given number of periods.
  697.                Usage: Rate(<nFutVal>,<nPresVal>,<nPeriods>)
  698. ContRate()  -- Compute rate if compounding is continuous.
  699.                Usage: ContRate(<nFutVal>,<nPresVal>,<nYears>)
  700. NPV()       -- Net Present Value of array aCashFlow[n].
  701.                Usage: NPV(<nRate>,<nPeriods>)
  702. IRR()       -- Internal Rate of Return, using ZeroIn().
  703.                Usage: Irr(<fX1>,<fX2>,<n_Flag>)
  704.  
  705. --------------------------------------
  706. ARRAY.PRG -- Array Processing Routines
  707. --------------------------------------
  708. AFill()     -- Fills an array with sequential elements. Useful for testing
  709.                array processing routines.
  710.                Usage: FillArray(<aArray>,<nArraySize>,<nFirstValue>,<nStep>)
  711. AMask()     -- Returns a "mask" specifying the desired row or column of an
  712.                array.
  713.                Usage: AMask(<cArrayskel>,<cVar>)
  714. AMean()     -- Mean of non-blank numeric or date values in specified row or
  715.                column of an array.
  716.                Usage: AMean(<cArrayskel>)
  717. AMax()      -- Maximum non-blank numeric, date or character value in specified
  718.                row or column of an array.
  719.                Usage: AMax(<cArrayskel>)
  720. AMin()      -- Minimum non-blank numeric, date or character value in specified
  721.                row or column of an array.
  722.                Usage: AMin(<cArrayskel>)
  723. AVar()      -- Finds population variance of non-blank numeric or date values
  724.                in specified row or column of a specified array.
  725.                Usage: AVar(<cArrayskel>)
  726. ASeek()     -- Performs a binary search in any specified ascending-sorted row
  727.                or column of an array.
  728.                Usage: aSeek(<cFindItem>,<aArray>,<nArraySize>)
  729. AShuffle()  -- Performs a shuffle of elements of an array randomly ...
  730.                Usage: aShuffle(<aArray>,<nLength>)
  731. ABubble()--    Performs a bubble sort (slow) on an array. By telling the
  732.                routine the number of passes, you can have it stop at a specific
  733.                point, and obtain some of the highest or lowest values, without
  734.                taking the time to perform a complete sort. To perform a
  735.                complete sort, pass the same value for nPasses as for nLength 
  736.                (number of elements in array) -- if you want a complete sort,
  737.                however, you may want to take another look at ShellSort()
  738.                below ... it's faster.
  739.                Usage: aBubble(<aArray>,<nLength>,<nPasses>)
  740. ArrayRows() -- Returns number of rows (elements) in an array.
  741.                Usage: ArrayRows(<aArray>)
  742. ArrayCols() -- Returns number of columns in an array.
  743.                Usage: ArrayCols(<aArray>)
  744. ShellSort() -- Performs a fast sort routine on an array. This array must be
  745.                copied into an array called: aMyArray. 
  746.                Usage: ShellSort(<nNumber>)
  747. ARec2Arr()  -- Creates a public array, aRecord[n], initialized to the record
  748.                format of the currently selected DBF, either blank or filled
  749.                with the values of the current record.
  750.                Usage: ARec2Arr(<lBlank>)
  751. aPullSort() -- Performs a sort on an array. This array must be copied into an
  752.                array called: aMyArray. This routine is theoretically faster than
  753.                the ShellSort() routine above, and definitely faster than the
  754.                aBubble() routine above.
  755.                Usage: aPullSort(<nNumber>)
  756.  
  757. -----------------------------------------
  758. MEASURE.PRG -- Conversion of Measurements
  759. -----------------------------------------
  760. Kg2Lb()     -- Used to convert Kilograms to Pounds.
  761.                Usage: Kg2Lb(<nKg>)
  762. Lb2Kg()     -- Used to convert Pounds to Kilograms.
  763.                Usage: Lb2Kg(<nPounds>)
  764. Inch2Cm()   -- Inches to Centimeters.
  765.                Usage: Inch2Cm(<nInches>)
  766. Cm2Inch()   -- Centimeters to Inches.
  767.                Usage: Cm2Inch(<nCm>)
  768. Km2Mile()   -- Kilometers to Miles.
  769.                Usage: Km2Mile(<nKm>)
  770. Mile2Km()   -- Miles to Kilometers.
  771.                Usage: Mile2Km(<nMiles>)
  772. Km2Naut()   -- Kilometers to Nautical miles.
  773.                Usage: Km2Naut(<nKm>)
  774. Naut2Km()   -- Nautical miles to Kilometers.
  775.                Usage: Naut2Km(<nNautMiles>)
  776. Naut2Stat() -- Nautical miles to Statute miles (approximate).
  777.                Usage: Naut2Stat(<nNautMiles>)
  778. Stat2Naut() -- Statute miles to Nautical miles (approximate).
  779.                Usage: Stat2Naut(<nStatMiles>)
  780. Fahr2Cel()  -- Fahrenheit to Celsius.
  781.                Usage: Fahr2Cel(<nFahrTemp>)
  782. Cel2Fahr()  -- Celsius to Fahrenheit.
  783.                Usage: Cel2Fahr(<nCelTemp>)
  784. Gal2Ltr()   -- US Gallons to Liters
  785.                Usage: Gal2Ltr(<nGal>)
  786. Ltr2Gal()   -- Liters to US Gallons
  787.                Usage: Ltr2Gal(<nLiters>)
  788. CuFt2Gal()  -- Cubic feet to US Gallons
  789.                Usage: CuFt2Gal(<nCubicFeet>)
  790. Gal2CuFt()  -- US Gallons to Cubic Feet
  791.                Usage: Gal2CuFt(<nGallons>)
  792.  
  793. -----------------------------------
  794. TRIG.PRG -- Trigonometric Functions
  795. -----------------------------------
  796. Note, all of these have the Usage:  FUNC(<nX>)
  797.  
  798. Secant()    -- Secant of an angle X in radians.
  799. Cosecant()  -- CoSecant of an angle X in radians.
  800. CoTan()     -- CoTangent of an angle X in radians.
  801. ASec()      -- Inverse Secant - angle size in radians.
  802. ACoSec()    -- Inverse Cosecant - angle size in radians.
  803. ACoT()      -- Inverse CoTangent
  804. SinH()      -- Hyperbolic Sine
  805. CosH()      -- Hyperbolic CoSine
  806. TanH()      -- Hyperbolic Tangent
  807. SecH()      -- Hyperbolic Secant
  808. CScH()      -- Hyperbolic CoSecant
  809. CoTH()      -- Hyperbolic CoTangent
  810. ASinH()     -- Inverse Hyperbolic Sine
  811. ACosH()     -- Inverse Hyperbolic CoSine
  812. ATanH()     -- Inverse Hyperbolic Tangent
  813. ASecH()     -- Inverse Hyperbolic Secant
  814. ACscH()     -- Inverse Hyperbolic CoSecant
  815. ACotH()     -- Inverse Hyperbolic Cotangent
  816. Hav()       -- Haversine 
  817. AHav()      -- Inverse Haversine
  818.  
  819. -----------------------------------
  820. NAVIGATE.PRG -- Navigation Routines
  821. -----------------------------------
  822. Correct()   -- Correction of direction - adjusts direction given, in degrees,
  823.                by a second number of degrees.
  824.                Usage: Correct(<nDirection>,<xCorrection>)
  825. UnCorrect() -- Uncorrection of direction - adjusts direction given, as above.
  826.                This is the inverse of Correct().
  827.                Usage: UnCorrect(<nDirection>,<xUnCorr>)
  828. XAngle()    -- Angle in degrees (<=90) at which two vectors in degrees
  829.                intersect.
  830.                Usage: XAngle(<nVector1>,<nVector2>)
  831. LeftWind()  -- Effect of second vector on first.
  832.                Usage: LeftWind(<nCourse>,<nWindFrom>)
  833. TailWind()  -- Is the effect of second vector on first additive?
  834.                Usage: TailWind(<nCourse>,<nWindFrom>)
  835. Heading()   -- Heading required to make good a course.
  836.                Usage: Heading(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  837. Course()    -- Course made good given heading, speed, wind dir, and force.
  838.                Usage: Course(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  839. GndSpeed()  -- Speed over the ground given heading, etc.
  840.                Usage: GndSpeed(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  841. Deg2Num()   -- Degrees to numbers ... converts character description of
  842.                degrees (Degrees Minutes Seconds:  40d50'30.2 N) to numeric
  843.                value.
  844.                Usage: Deg2Num("<cDms>")
  845. BearsDist() -- Distance to an object at the time of the second bearing.
  846.                Usage: BearsDist(<nBear1>,<nBear2>,<nRun>)
  847. BearsPass() -- Distance at which an object will be when abeam given 2 bearings.
  848.                Usage: BearsPass(<nBear1>,<nBear2>,<nRun>)
  849. BearsRun()  -- Distance to run until object will be abeam given two bearings.
  850.                Usage: BearsRun(<nBear1>,<nBear2>,<nRun>)
  851. GCDist()    -- Great Circle distance between 2 points given latitude and long.
  852.                of each. 
  853.                Usage: GcDist(<cLat1>,<cLon1>,<cLat2>,<cLon2>)
  854. GcCourse()  -- Initial Great Circle course between two points given lat and 
  855.                long of each. (Following a 'Great Circle' requires course 
  856.                changes.
  857.                Usage: GcCourse(<cLat1>,<cLon1>,<cLat2>,<cLon2>)
  858.  
  859. ---------------------------------
  860. STATS.PRG -- Statistical Routines
  861. ---------------------------------
  862. Samplevar() -- Finds sample variance of specified field of the current database.
  863.                Usage: SampleVar(<cField>[,<cClause>])
  864. Stny()      -- Returns value of the standard normal distribution function given
  865.                a number of standard deviations from the mean.
  866.                Usage: Stny(<nDevs>)
  867. StnArea()   -- Area of the standard normal distribution function between mean
  868.                and given number of standard deviations from the mean.
  869.                Usage: StnArea(<nDevs>)
  870. Stnz()      -- Lookup table to find the values of 'z', standard deviations,
  871.                corresponding to the most common areas inside a given number
  872.                of tails of the normal distribution function.
  873.               Usage: Stnz(<nProb>,<nTails>)
  874. StnDiff()   -- Determines whether hypothesis that sample of a given mean is
  875.                different from expected mean is justified.
  876.                Usage: StnDiff(<nConf>,<nTails>,<nSample>,<nSampMean>,;
  877.                                <nPopMean>,<nPopStd>)
  878. StnDevs()   -- Calculates 'z', standard deviations, corresponding to any
  879.                area of standard normal curve between mean and the desired
  880.                z. Much slower than Stnz().
  881.                Usage: StnDevs(<nArea>)
  882. TstnArea()  -- Translation function to convert area to left of point under
  883.                standard normal curve to 0 for ZeroIn().
  884.                Usage: TstnArea(<nDevs>,<nArea>)
  885. ZeroIn()    -- Finds a zero of a continuous function.
  886.                Usage: ZeroIn(<cFunction>,<fX1>,fX2>,<fAbsError>,<nMaxiter>,;
  887.                               <n_Flag>)
  888.  
  889. ---------------------------------------
  890. FIELDS.PRG -- Field Processing Routines
  891. ---------------------------------------
  892. MemoPagr()  -- Used to display a memo in a window on screen, allows user to
  893.                scroll up and down through memo.
  894.                Usage: MemoPagr("<cMemo>",<nULRow>,<nULCol>,<nBRRow>,<nBRCol>)
  895. ScanMemo    -- Used to remove hard returns in all memo fields in all records
  896.                of a specified database.
  897.                Usage: Do ScanMemo with "<cDbf>"
  898. Cut         -- Used to cut to a global memvar CLIPBOARD the contents of a field
  899.                or memvar on screen (during a read) -- can then be used with
  900.                PASTE.
  901.                Usage: do Cut with "<cFld>","<cScrType>"
  902. Copy        -- Used to COPY to a global memvar CLIPBOARD the contents of a
  903.                field or memvar on screen, so it can be used with PASTE.
  904.                Usage: do Copy with "<cFld>"
  905. Paste       -- Used to paste the contents of CLIPBOARD (global memvar) to
  906.                the current field.
  907.                Usage: do Paste with "<cFld>","<cScrType>"
  908. Blanker()   -- Used to blank out a numeric field upon input of a valid numeric
  909.                item. Useful with GETs ...
  910.                Usage: Blanker()
  911.  
  912. -----------------------------------
  913. FILES.PRG -- File Handling Routines
  914. -----------------------------------
  915. AllTags     -- Used to bring up a popup/picklist of MDX tags ... can be
  916.                assigned to a function key.
  917.                Usage: do AllTags with <nULRow>,<nULCol>
  918. RedoTags    -- Used to deal with "bloated" MDX files. This will delete old
  919.                tags and recreate the MDX file, reducing the size of it, and
  920.                making access faster. 
  921.                Usage: do RedoTags with "<cDBF>" && note, do not include ext.
  922. AutoRedo    -- Used to bring up a picklist of DBF files, so that you (or the
  923.                user) can choose which to redo the tags for.
  924.                Usage: do AutoRedo with <nXTL>,<nYTL>,<nXBR>,<nYBR>,<cColor>)
  925. PrntTags    -- Used to print a list of tags/expressions to either the printer
  926.                or a file for a specific database.
  927.                Usage: do PrntTags with "<cDBF>"
  928. ListDBFs    -- Used to create a simple database (DBFS.DBF) containing the names
  929.                of all databases in the current directory.
  930.                Usage: do ListDBFs
  931. ReCompile() -- Recompiles all dBASE source-code files. 
  932.                Usage: Recompile([<cDir>],[,<cSkel>[,"R"]])
  933. MakeDbf     -- Makes an empty DBF.
  934.                Usage: Do MakeDbf with <cFileName>,<aArray>
  935. MakeDbf2    -- Makes an empty DBF, assumes array aMakeDBF[n,5].
  936.                Usage: Do MakeDBF with <cDBFpath>,<cStruPath>
  937. MakeStru()  -- Makes an empty dBASE Structure EXTENDED file and returns its
  938.                root name.
  939.                Usage: MakeStru()
  940. MakeStru2() -- Makes an empty dBASE Structure EXTENDED file, using dBASE print
  941.                redirection. User/programmer may specify to save database
  942.                in directory specified by DBTMP (DOS Environment variable) or
  943.                in the current directory.
  944.                Usage: MakeStru2(<lDBTmp>)
  945. TempName()  -- Returns a name that can be used for a file of given extension
  946.                without conflicting with names of existing files. If extension
  947.                is 'DBF', assures that no .DBT or .MDX of that name exists as 
  948.                well.
  949.                Usage: TempName(<cExtension>,<lDBTmp>)
  950. FileMove    -- Used to handle data entry/editing, allowing the user to move
  951.                through the database by pressing specific keys. See internal
  952.                docs for more detail.
  953.                Usage: do FileMove with <nKey>
  954. Used()      -- Checks to see if a database is currently in use -- returns a
  955.                logical.
  956.                Usage: Used("<cFile>")
  957. MDXByte()   -- Used to set the MDX Byte in a DBF header ON or OFF.
  958.                Usage: MDXByte(<cDBFPath>,<cOnOff>)
  959. aDir()      -- Creates a public array GADIR[n,4] containing directory 
  960.                information. It is limited to 292 files or less, depending on
  961.                the memory available. Requires SEARCH.BIN.
  962.                Usage: aDir(<cFMask>,<cBINPath>,<cAttr>)
  963. DBFDir()    -- Creates (or Overwrites) DBDDIR.DBF, and populates it with
  964.                directory information. Uses the DOS 5.0 DIR command, and requires
  965.                DOS 5.0. DO NOT ATTEMPT TO USE WITH PREVIOUS VERSIONS OF DOS.
  966.                Usage: DBFDir(<cPathSkel>,<lHidSys>)
  967. ParsPath()  -- Extracts and returns the path from a full path file 
  968.                specification.
  969.                Usage: ParsPath(<cFullPath>)
  970.  
  971. ----------------------------------
  972. MISC.PRG -- Miscellaneous Routines
  973. ----------------------------------
  974. PlayIt()    -- Plays a song based on parameter passed. 1 = Dirge, 
  975.                2 = "touchdown", programmer may add more as needed ...
  976.                Usage: PlayIt(<nSong>)
  977. PageEst     -- Will estimate number of pages in a report, and then ask if you
  978.                wish to generate said report ... requires three parameters:
  979.                nCount = record count (may be 0, in which case procedure will
  980.                         try to count the records)
  981.                cReport = report name, with any FOR condition you wish -- if
  982.                          you use a FOR condition, and give a '0' for the nCount
  983.                          parameter, the procedure will count the records that
  984.                          match the FOR (only a FOR is setup at the moment).
  985.                nRecords = number of records that will print on a page. If you
  986.                          send '0', the procedure will calculate based on 60 
  987.                          records to the page.
  988.                Usage: do PageEst with <nCount>,"<cReport>",<nRecords>
  989. Permutes()  -- Permutations of a number of items taken x amount at a time.
  990.                Usage: Permutes(<nNum>,<nHowMany>
  991. Combos()    -- Combinations, similar to above -- slight difference. See docs.
  992.                Usage: Combos(<nNum>,<nHowMany>)
  993. BinLoad()   -- A function used to manage .BIN files.
  994.                Usage: BinLoad(<cBinName>)
  995. DialUp()    -- A simple dialer routine. (No longer requires LOWLEVEL.BIN)
  996.                Usage: DialUp(<cPhoneNo>)
  997. CurrPort()  -- Returns the current port being used by the SET PRINT command.
  998.                Requires a database (CURRPORT.DBF, one field, 80 characters,
  999.                called CURRPRT, indexed on said field ...)
  1000.                Usage: CurrPort()
  1001. FileLock()  -- Returns a logical if an attempt to lock a file on a LAN was
  1002.                successful, displays a message otherwise.
  1003.                Usage: FileLock("<cColor>")
  1004. RecLock()   -- Returns a logical if an attempt to lock a record on a LAN was
  1005.                successful, displays a message otherwise.
  1006.                Usage: RecLock("<cColor>")
  1007. DosShell    -- Swaps out dBASE from memory, loads a DOS shell.
  1008.                Usage: do DosShell with <cAppName>
  1009. IsDisk()    -- Checks a disk in a disk drive to see if it's valid (door open,
  1010.                unformatted disk, etc.). Uses DISK.BIN.
  1011.                Usage: IsDisk("<cDrive>","<cColMess>","<cColErr>")
  1012.  
  1013. -------------------------------------
  1014. SCA.PRG -- SCA Date Handling Routines
  1015. -------------------------------------
  1016. SCA_Real    -- Special purpose for SCA (Society for Creative Anachronism),
  1017.                brings up a window, enter date in SCA dates, converts to "real"
  1018.                dates (dBASE format).
  1019.                Usage: do SCA_Real
  1020. SCA2Real()  -- This function works like SCA_Real, without the user-input.
  1021.                Usage: SCA2Real(<cDay>,<cMonth>,<cYear>) && cyear=Roman Numeral
  1022. Real_SCA()  -- Used to convert 'real' (dBASE format) dates into SCA dates.
  1023.                (see SCA_Real Procedure above)
  1024.                Usage: Real_SCA(<dDate>)
  1025.  
  1026. ------------------------------------------------------
  1027. FRPG.PRG -- FRPG (Fantasy Role-Playing Games) ROUTINES
  1028. ------------------------------------------------------
  1029. SetRand     -- Procedure used to set a random # table, based on the time it
  1030.                is called, multiplied by the seconds at that moment. Useful
  1031.                for calling before using any of routines below. Used ONCE
  1032.                in a dBASE session, should be enough. The reason for this
  1033.                procedure is that I have found that using RAND(-1) often returns
  1034.                exactly the same values if the exact same function call (i.e.,
  1035.                Dice() below) is made several times. This doesn't, therefore,
  1036.                do what I want. By using the current TIME, I can get a different
  1037.                random number table each time. Use EITHER this function OR
  1038.                RAND(-1) during any one session of dBASE.
  1039. Dice()      -- Used to simulate the roll of a dice, will handle different types
  1040.                of dice (for FRPG type games, where you have 4,6,8,10,12,20,100
  1041.                sided dice ...)
  1042.                Usage: Dice(<nSides>)
  1043. MultDice()  -- As above but for multiple die (more than one).
  1044.                Usage: MultDice(<nNum>,<nSides>)
  1045. ValiDice()  -- Asks a gamer to enter a valid die roll, GM/Programmer specifies
  1046.                # of dice, number of sides ... (i.e., 3d6 is 3 six-sided dice,
  1047.                if GM says: 3,6 the program will ask for a value from 3 to 18,
  1048.                and not allow any other input).
  1049.                Usage: ValiDice(<nNum>,<nSides>,"<cMessage>","<cColor>")
  1050. DiceChoose()-- Presents three choices (in menu format) for gamer to use, die
  1051.                dice rolls ...
  1052.                Usage: DiceChoose(<nNum>,<nSides>,"<cMessage>","<cColor>")
  1053. ParseDice() -- Used to parse character field/memvar for xdy+z format of dice
  1054.                (a standard gaming format) and evaluate the value. I.e.,
  1055.                3d6+1 = 3 six-sided dice, +1 for each die rolled, giving a
  1056.                range from 6 to 21 -- function will return random number in 
  1057.                that range (actually "rolling" 3 six-sided dice, adding 1 in
  1058.                example). 
  1059.                Usage: ParseDice("<cDiceString>")
  1060. PopDice        Used to popup a place the user can enter a quick die roll, and
  1061.                have the computer do the actual dice rolling. Handy little
  1062.                routine ...
  1063.                Usage: do PopDice with <cColor>
  1064.                Example: ON KEY LABEL ALT-D DO POPDICE WITH "rg+/rg,w+/n,rg+/rg"
  1065.  
  1066. --------------------------------------------------------------------------------
  1067. OBSOLETE.PRG -- These are functions that, due to the advent of dBASE IV, 1.5,
  1068. are no longer necessary. However, if you are a user of 1.1, and wish to still
  1069. use these functions, they are still available, but with little support.
  1070. --------------------------------------------------------------------------------
  1071. Empty()     -- Returns a logical (.t. or .f.) if a field or memvar is empty. 
  1072.                In release 1.5 this is replaced with the internal function: 
  1073.                ISBLANK().
  1074.                Usage: Empty(<cField>)
  1075.                Recommendation: If creating a system that uses both dBASE IV
  1076.                versions 1.5 and earlier versions, rename this function to 
  1077.                ISBLANK(). If the system is an earlier version of dBASE, this
  1078.                function will be used, and if 1.5 or later, the internal function
  1079.                will be used.
  1080. NumFlds()   -- Counts the fields in a given database. This is replaced in 
  1081.                version 1.5 of dBASE IV with FLDCOUNT().
  1082.                Usage: NumFlds(<cDBF>)
  1083. DateSet()   -- Returns a string giving name of current DATE format.
  1084.                Usage: DateSet()
  1085. StampVal()  -- Evaluates a 16-character string in the form of the rightmost 
  1086.                16 characters returned by the DOS DIR command for a file.
  1087.                Usage: StampVal(<cTimeStamp>)
  1088. FullWin     -- Handy to overlay a screen with a full-screen window ...
  1089.                Usage: do FullWin with "<cColor>","<cWinName>","<cScreen>"
  1090. SetColor    -- used to set a memory file with colors, or load colors into
  1091.                memory variables from a memory file.
  1092.                Usage: do SetColor
  1093. SetColor2   -- used to set a mem file as above, but asks for a parameter to
  1094.                be sent, so that when designing a system, you can ask the
  1095.                user if their monitor is color or mono ... you pass "Y" or
  1096.                "N" ... i.e.,
  1097.                Usage: do SetColor2 with "<cYN>"
  1098. ExtrClr()   -- Used to extract the first parameter of a color memory variable.
  1099.                Usage: ExtrClr(<cColorVar>)
  1100. InvClr()    -- Can invert the colors of a color memory variable.
  1101.                Usage: InvClr(<cColorVar>)
  1102.  
  1103. --------------------------------------------------------------------------------
  1104. Enjoy. Happy computing. 
  1105.  
  1106. KJM
  1107. --------------------------------------------------------------------------------
  1108. -- EoF: README.TXT
  1109. --------------------------------------------------------------------------------
  1110.