home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / PDOXLIB.ZIP / MANUAL.DOC < prev    next >
Encoding:
Text File  |  1992-01-12  |  47.8 KB  |  3,169 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                   INTRODUCTION 
  9.            
  10.            
  11.            
  12.           Welcome to PDOXLIB! 
  13.            
  14.           PDOXLIB is a collection of more than 40 Paradox routines 
  15.           written entirely in PAL Version 3.5. 
  16.            
  17.           The routines range from the simple to the complex and from 
  18.           the workhorses to the fun. 
  19.            
  20.           You'll find lots of routines that prompt the user for 
  21.           information in different ways. You'll find routines that 
  22.           format data and ones that remove or replace unwanted 
  23.           characters. 
  24.            
  25.           But you'll also find a handy gauge routine that keeps the 
  26.           user informed of the progress of your calculations. A crawl 
  27.           routine prints an attractive message across the bottom of 
  28.           the screen. 
  29.            
  30.           There's even a pop-up calendar written entirely in PAL! Few 
  31.           busy programmers would take the time to write such a 
  32.           routine, but it's the type of finishing touch that adds 
  33.           class and convenience to your hard-working application. 
  34.            
  35.           PDOXLIB routines can be used as is or the source code can be 
  36.           modified to meet your own needs. The code is liberally 
  37.           commented, so making your own changes is easy. 
  38.            
  39.           But remember, PDOXLIB is shareware. If you use it you have a 
  40.           responsibility to pay for it. There are plenty of good 
  41.           reasons to register PDOXLIB, but the point of shareware is 
  42.           to give you the chance to try out the software and see if it 
  43.           meets your needs. If so, then it's time to put the check in 
  44.           the mail. 
  45.            
  46.                          WHY SHOULD I REGISTER PDOXLIB? 
  47.            
  48.           The best reason to register PDOXLIB is that it's the right 
  49.           thing to do. Hard work went into the creation of PDOXLIB and 
  50.           just as you wouldn't want your work stolen, neither does the 
  51.           author of PDOXLIB. 
  52.            
  53.           But from a practical standpoint, why not register it? The 
  54.           cost is only $20 plus postage and handling. Compared to the 
  55.           cost of writing one or two of these routines yourself, it's 
  56.           downright cheap. 
  57.            
  58.           The source code alone is worth the price. You may also find 
  59.           you love one of the routines, but hate the choice of colors. 
  60.           With the source code, the full range of available colors is 
  61.           open to you. 
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.            
  76.           From a practical standpoint, you'll find the PDOXLIB library 
  77.           to be quite large. In fact, it's really too large for 
  78.           practical use. Adding the library to an existing application 
  79.           would slow your program down as the computer searches 
  80.           through another 100,000 bytes looking for a routine. 
  81.            
  82.           With the source code, you add only the routines you need to 
  83.           your libraries and keep your programs running at their peak 
  84.           speeds. 
  85.            
  86.           So put PDOXLIB through its paces and if it works for you, 
  87.           then drop a check in the mail. 
  88.            
  89.           We'd also welcome your comments, suggestions for changes in 
  90.           the routines or requests for new routines. 
  91.            
  92.           And if you don't like a routine, tell us that too. We want 
  93.           PDOXLIB to be a helpful addition to your toolbox. 
  94.            
  95.           And if you're a beginning PAL programmer, reading the 
  96.           PDOXLIB source code can spur your creativity to write 
  97.           routines of your own. 
  98.            
  99.           PDOXLIB is distributed with the source code, but it is 
  100.           password protected. When we receive your payment, we will 
  101.           provide you with the password that will give you access to 
  102.           the source code. 
  103.            
  104.            
  105.                            HOW DO I REGISTER PDOXLIB? 
  106.            
  107.           First run the routine code () that is in the PDOXLIB 
  108.           library. The routine provides you with a code word to give 
  109.           us that tells us which password unlocks your files. 
  110.            
  111.           Do this by selection miniscript from the debug menu (ALT- 
  112.           F10), then typing the following: autolib = "pdoxlib" code () 
  113.            
  114.           The press the ENTER key and the code word should appear on 
  115.           your screen. 
  116.            
  117.           Why the code? We are tracking which BBS systems give us best 
  118.           distribution and buyers. The code tells us on which BBS your 
  119.           version of PDOXLIB was originally uploaded. Since each BBS 
  120.           we used has a different password, it's important for us to 
  121.           know it. 
  122.            
  123.           Send us $20 plus the code word that prints on your screen. 
  124.           Upon receipt of your payment, we'll send you the password. 
  125.           If you wish to have the password telephoned to you or have 
  126.           it sent via CompuServe or Exec-PC, please provide the 
  127.           appropriate telephone numbers, mail addresses, and log-on 
  128.           names we need to contact you. 
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.           atprint 
  143.            
  144.            
  145.           Description: Prints a string of text in a specified 
  146.           attribute at a row and column position on the canvas. 
  147.            
  148.           Syntax:   atprint.u(text.a, attrib.n, row.n, col.n) 
  149.            
  150.           Where: 
  151.                text.a. . . . is the text to be printed 
  152.                attrib.n. . . is the attribute number for the text. 
  153.                row.n . . . . is the row where the text is to be printed. 
  154.                col.n . . . . is the column where text is to be printed. 
  155.            
  156.            
  157.           While any beginning PAL programmer can handle the writing of 
  158.           this code, this routine provides a code-reusable way of 
  159.           handling a regular chore. In fact, the process is so routine 
  160.           many programmers would not even think of writing such a 
  161.           routine.
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.           bgetdate 
  210.            
  211.            
  212.           Description: Prompts the user for a date via the dialog box. 
  213.           The procedure uses PAL's ACCEPT statement for getting data. 
  214.            
  215.           Syntax:   newdate.d = bgetdate.d () 
  216.            
  217.           Where: 
  218.                newdate.d . . receives a new, valid date 
  219.            
  220.            
  221.           This routine pops a dialog box into the center of the screen 
  222.           and prompts the user to enter a day in the MM/DD/YY format. 
  223.           Because ACCEPT is used, only a valid date may be entered.
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.           bgetdate2 
  277.            
  278.            
  279.           Description: Prompts the user via a dialog box for a date in 
  280.           the MM/DD/YY format. It uses a more elegant way of gathering 
  281.           the data than does the PAL ACCEPT command. 
  282.            
  283.           Syntax:   newdate.d = bgetdate2.d () 
  284.            
  285.           Where: 
  286.                newdate.d . . receives a new, valid date 
  287.            
  288.            
  289.           Although Paradox provides validation checks for field data 
  290.           entry, there are times, such as when prompting for query 
  291.           information, where a dialog box is helpful. This routine 
  292.           pops a box onto the center of the screen and prompts the 
  293.           user to enter a day in the MM/DD/YY format. The routine will 
  294.           only accept valid dates, although the user may press ESC to 
  295.           leave the routine.
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.           bgetphone 
  344.            
  345.            
  346.           Description: Prompts the user for a telephone number via a 
  347.           dialog box on the screen. It uses the PAL ACCEPT command and 
  348.           requires an area code entry. The routine returns a string in 
  349.           the format: NNN-NNN-NNNN. 
  350.            
  351.           Syntax:   phonenumber.a = bgetphone.a () 
  352.            
  353.           Where: 
  354.                phonenumber.a .receives a telephone number 
  355.            
  356.            
  357.           Although Paradox provides validation checks for field data 
  358.           entry, there are times, such as when prompting for query 
  359.           information, where a dialog box is helpful. This routine 
  360.           pops a box onto the center of the screen and prompts the 
  361.           user to enter a telephone number in the NNN-NNN-NNNN format.
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.           bgetphone2 
  411.            
  412.            
  413.           Description: Prompts the user for a telephone number via a 
  414.           dialog box on the screen. It uses a more visual way of 
  415.           gathering the information than is possible with the PAL 
  416.           ACCEPT command. 
  417.            
  418.           Syntax:   phonenumber.a = bgetphone2.a() 
  419.            
  420.           Where: 
  421.                phonenumber.a .receives a formatted telephone number 
  422.            
  423.            
  424.           Although Paradox provides validation checks for field data 
  425.           entry, there are times, such as when prompting for query 
  426.           information, where a dialog box is helpful. This routine 
  427.           pops a box onto the center of the screen and prompts the 
  428.           user to enter a telephone number in the (___) ___-____ 
  429.           format. The user may press ESC to leave the routine.
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.           bgetssn 
  478.            
  479.            
  480.           Description: Prompts the user for a social security number 
  481.           via a dialog box on the screen. It uses the PAL ACCEPT 
  482.           command. The routine returns a string in the format: NNN-NN- 
  483.           NNNN. 
  484.            
  485.           Syntax:   ssn.a = bgetssn.a () 
  486.            
  487.           Where: 
  488.                ssn.a . . . . receives a formatted social security number 
  489.            
  490.            
  491.           Although Paradox provides validation checks for field data 
  492.           entry, there are times, such as when prompting for query 
  493.           information, where a dialog box is helpful. This routine 
  494.           pops a box onto the center of the screen and prompts the 
  495.           user to enter a social security number in the NNN-NN-NNNN 
  496.           format.
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.           bgetssn2 
  545.            
  546.            
  547.           Description: Prompts the user for a social security number 
  548.           via a dialog box on the screen. It uses a more visual way of 
  549.           gathering the information than is possible with the PAL 
  550.           ACCEPT command. 
  551.            
  552.           Syntax:   ssn.a = bgetssn2.a () 
  553.            
  554.           Where: 
  555.                ssn.a . . . . receives a formatted social security number 
  556.            
  557.            
  558.           Although Paradox provides validation checks for field data 
  559.           entry, there are times, such as when prompting for query 
  560.           information, where a dialog box is helpful. This routine 
  561.           pops a box onto the center of the screen and prompts the 
  562.           user to enter a social security number in the NNN-NN-NNNN 
  563.           format. The user may press ESC to leave the routine.
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.           calcage 
  612.            
  613.            
  614.           Description: Using a date of birth, the routine returns the 
  615.           person's age. 
  616.            
  617.           Syntax:   currentage.n = calcage.n (dob.d) 
  618.            
  619.           Where: 
  620.                dob.d . . . . is the person's birth date 
  621.                currentage.n. receives the age 
  622.            
  623.            
  624.           The routine can be used when an age instead of a date is 
  625.           needed. It can also be used to fill in an age field if only 
  626.           a date of birth field exists. If procedures are allowed in 
  627.           forms in future versions of Paradox, the routine might also 
  628.           be useful to keep an accurate running age of a person when 
  629.           only the date of birth is available.
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.           copyfile 
  679.            
  680.            
  681.           Description: Copies a file to a new disk or directory. 
  682.            
  683.           Syntax:   copyfile.u () 
  684.            
  685.            
  686.           This routine can be used to copy an individual file to a 
  687.           disk or new directory. If used on a table, it will not copy 
  688.           the related family. The PAL COPY command should be used for 
  689.           that purpose. However this does provide an easy way of 
  690.           copying a file without overtly shelling out to DOS. The 
  691.           routine provides a Paradox-style menu of files in the 
  692.           current directory, asks for a destination, checks to see if 
  693.           the destination is valid, then uses DOS to actually copy the 
  694.           file. The routine does not check to see if there is 
  695.           sufficient space to copy the file, however.
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.           crawl 
  746.            
  747.            
  748.           Description: Displays a message that crawls across the 
  749.           bottom of the screen to let the user know that work is in 
  750.           progress. 
  751.            
  752.           Syntax:   crawl.u(message.a) 
  753.            
  754.           Where: 
  755.                message.a . . is the message to be displayed on the crawl 
  756.            
  757.            
  758.           Crawl is intended to a included in a loop such as WHILE or 
  759.           FOR. With each pass through the loop the program determines 
  760.           the current position of the message and advances it one 
  761.           column. 
  762.            
  763.           For example: 
  764.            
  765.                While true 
  766.                   crawl.u("Processing data") 
  767.                   .... 
  768.                   .... 
  769.                   .... 
  770.                Endwhile 
  771.            
  772.           While the program is relatively speedy, it does include a 
  773.           short pause to make the message readable. For short 
  774.           processing times, the routine should not pose a problem, but 
  775.           if the loop is expected to take some time, crawl.u will 
  776.           probably provide too much of a delay.
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.           delrec 
  813.            
  814.            
  815.           Description:  A routine to delete the record currently 
  816.           hosting the cursor. 
  817.            
  818.           Syntax:   delrec.u () 
  819.            
  820.            
  821.           The routine will delete the current record after prompting 
  822.           the user to confirm that choice. The routine can be called 
  823.           from main, edit or coedit modes. If called in main mode, the 
  824.           routine will return the user to main mode at the conclusion. 
  825.            
  826.           One advantage of the routine is that is saves the most 
  827.           recently deleted record in memory. By using the companion 
  828.           routine, saverec.u, the record can be restored. This is true 
  829.           even if the deletion was made in coedit mode, the edit 
  830.           session was ended with F2 and the table was removed from the 
  831.           screen. 
  832.            
  833.           Only the most recent deletion is held in memory and that is 
  834.           lost when the user exits Paradox.
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.           fullname 
  880.            
  881.            
  882.           Description:  Returns the full path name of the current 
  883.           directory. 
  884.            
  885.           Syntax:   pathname.a = fullname.a(filename.a, styl.n) 
  886.            
  887.           Where: 
  888.                filename.a. . is a file in the current directory 
  889.                styl.n. . . . selects single or double backslashes 
  890.                pathname.a. . receives the full path name 
  891.            
  892.            
  893.           When changing directories within an application, it is often 
  894.           useful to retain valid path names for calling tables or 
  895.           reports later. This utility allows you to capture that 
  896.           information in a variable.  
  897.            
  898.           Instead of the filename.a, the user can use the PAL function 
  899.           TABLE (). The routine will then return the full path name of 
  900.           a table, but without the .DB file extension. Of course the 
  901.           table must be on the workspace for the TABLE () function to 
  902.           work properly. 
  903.            
  904.           Some Paradox functions also require a double backslash in 
  905.           which to work properly. By entering a value of zero, the 
  906.           function will return the path with double backslashes. Any 
  907.           other value will return single backslashes.
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.           getdate 
  947.            
  948.            
  949.           Description:  Prompts the user for a date at the current 
  950.           cursor position. 
  951.            
  952.           Syntax:   newdate.d = getdate.d() 
  953.            
  954.           Where: 
  955.                newdate.d . . receives a date in the MM/DD/YY format 
  956.            
  957.            
  958.           Using the ACCEPT command, getdate.d prompts the user for a 
  959.           date. Care must be taken before calling getdate.d to place 
  960.           the cursor in the correct position. The routine offers a 
  961.           plain vanilla way of getting a date. For a more elegant way, 
  962.           see getdate2.
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.           getdate2 
  1014.            
  1015.            
  1016.           Description:  A more visual way of getting a date from the 
  1017.           user at the current cursor position. 
  1018.            
  1019.           Syntax:   newdate.d = getdate2.d () 
  1020.            
  1021.           Where: 
  1022.                newdate.d . . receives a date in the MM/DD/YY format 
  1023.            
  1024.            
  1025.           Unlike getdate.d, getdate2.d provides an image on the screen 
  1026.           for the user to complete. By providing that image, it helps 
  1027.           the user determine how the date should be entered. The 
  1028.           routine checks to see if the date is valid before allowing 
  1029.           the user to leave, however the user may press ESC to leave 
  1030.           the routine. If so, the routine returns "ESC" to newdate.d.
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.           getphone 
  1081.            
  1082.            
  1083.           Description:  Prompts the user for a telephone number at the 
  1084.           current cursor position. 
  1085.            
  1086.           Syntax:   newnumber.a = getphone.a () 
  1087.            
  1088.           Where: 
  1089.                newnumber.a . receives a telephone number. 
  1090.            
  1091.            
  1092.           The routine uses PAL's ACCEPT command to return a telephone 
  1093.           number in the ###-##-#### format.
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.           getphone2 
  1148.            
  1149.            
  1150.           Description:  Provides a more visual way of prompting the 
  1151.           user for a telephone number at the current cursor location. 
  1152.            
  1153.           Syntax:   newnumber.a = getphone2.a () 
  1154.            
  1155.           Where: 
  1156.                newnumber.a . receives a telephone number. 
  1157.            
  1158.            
  1159.           getphone2.a provides a more visual way to prompt the user 
  1160.           for a telephone number. The routine requires numeric input, 
  1161.           but will return ESC if the user escapes out of the routine. 
  1162.           The routine could be easily modified to allow a default area 
  1163.           code, thus speeding data entry. The returned format is ###- 
  1164.           ###-####.
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.           getnum 
  1215.            
  1216.            
  1217.           Description:  Prompts the user to enter a number at the 
  1218.           current cursor location. 
  1219.            
  1220.           Syntax:   newnumber.n = getnum.n () 
  1221.            
  1222.           Where: 
  1223.                newnumber.n . receives a number typed in by the user. 
  1224.            
  1225.            
  1226.           This is a simple ACCEPT version of getting a number from the 
  1227.           user. Since the style or format of the number is unknown, no 
  1228.           formatting or validity checking can be done. If the user 
  1229.           leaves the routine without entering a number or by pressing 
  1230.           ESC, the routine returns false.
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.           getssn 
  1282.            
  1283.            
  1284.           Description:  Provides a simple way of prompting the user to 
  1285.           enter a social security number at the present cursor 
  1286.           location. 
  1287.            
  1288.           Syntax:   ssn.a = getssn.a () 
  1289.            
  1290.           Where: 
  1291.                ssn.a . . . . receives a social security number. 
  1292.            
  1293.            
  1294.           Using PAL's accept command, this routine provides a quick 
  1295.           way of getting a social security number. ESC is returned if 
  1296.           the user escapes out of the routine. The format of the 
  1297.           number is ###-##-####.
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.           getssn2 
  1349.            
  1350.            
  1351.           Description:  Provides a more visual way of prompting the 
  1352.           user to enter a social security number at the current cursor 
  1353.           location. 
  1354.            
  1355.           Syntax:   ssn.a = getssn2.a () 
  1356.            
  1357.           Where: 
  1358.                ssn.a . . . . receives a social security number. 
  1359.            
  1360.            
  1361.           Provides a more visual way of prompting the user for a 
  1362.           social security number. The routine puts an image of the 
  1363.           number in the current cursor location and accepts numbers 
  1364.           from the user. ESC is returned if the user presses the 
  1365.           escape key. The number is returned in the ###-##-#### 
  1366.           format.
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.           gettext 
  1416.            
  1417.            
  1418.           Description:  Gets a line of text at the current cursor 
  1419.           location and formats it to all upper case, lower case or 
  1420.           capitalizing the first letter of each word. 
  1421.            
  1422.           Syntax:   newtext.a = gettext.a(length.n, styl.n) 
  1423.            
  1424.           Where: 
  1425.                newtext.a . . receives a formatted string of text 
  1426.                length.n. . . is the maximum length of the string 
  1427.                styl.n. . . . is 1, 2 or 3 to indicate the style desired 
  1428.            
  1429.            
  1430.           The routine prompts the user to input a string of text at 
  1431.           the current cursor location. If the user exits the routine 
  1432.           without entering text or by pressing ESC, the routine 
  1433.           returns false.  
  1434.            
  1435.           The length.n variable tells the routine how much text should 
  1436.           be received from the user. The styl.n variable should be set 
  1437.           to 1 if the text is to be returned in all capitals, 2 if it 
  1438.           is to be all lower case or 3 if the first letter of each 
  1439.           word is to be capitalized. If any other value is entered, 
  1440.           the string is returned unaltered. 
  1441.            
  1442.           The routine also calls the lrtrim.a routine to ensure that 
  1443.           newtext.a receives a string without leading or trailing 
  1444.           spaces.
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.           hmsgbox 
  1483.            
  1484.            
  1485.           Description:  Puts a box on the screen with a headline and a 
  1486.           one line message. The user is prompted for a keypress before 
  1487.           the routine ends. 
  1488.            
  1489.           Syntax:   hmsgbox.u(hed.a, message.a) 
  1490.            
  1491.           Where: 
  1492.                hed.a . . . . is the headline at the top of the box 
  1493.                message.a . . is the one line message 
  1494.            
  1495.            
  1496.           The routine provides a convenient way of passing a brief 
  1497.           message to the user. Both headline and message can be any 
  1498.           length, but the message should be longer than the headline. 
  1499.            
  1500.           Once the message is placed on the screen, the user to told 
  1501.           to press any key to continue as a way of allowing him or her 
  1502.           to control program flow.
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.           hmsgbox2 
  1550.            
  1551.            
  1552.           Description:  Puts a box on the screen with a headline and a 
  1553.           two line message. The user is prompted for a keypress before 
  1554.           the routine ends. 
  1555.            
  1556.           Syntax:   hmsgbox2.u(hed.a, line1.a, line2.a) 
  1557.            
  1558.           Where: 
  1559.                hed.a . . . . is the headline to be printed 
  1560.                line1.a . . . is the first line to be printed in the box 
  1561.                line2.a . . . is the second line to be printed in the box 
  1562.            
  1563.            
  1564.           The routine provides a convenient was of passing a two-line 
  1565.           message to the user. Both line1.a and line2.a can be of any 
  1566.           length, but at least one of the lines should be longer than 
  1567.           the headline. 
  1568.            
  1569.           Once the message is placed on the screen, the user is told 
  1570.           to press any key to continue as a way of allowing him or her 
  1571.           to control program flow.
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.           insertrec 
  1617.            
  1618.            
  1619.           Description:  Allows the user to enter a new record. 
  1620.            
  1621.           Syntax:   insertrec.u () 
  1622.            
  1623.            
  1624.           The routine works from main, edit or coedit modes and opens 
  1625.           a new record for the user to enter. 
  1626.            
  1627.           The routine puts the new record into a WAIT RECORD and 
  1628.           prompts the user to press F2 when the entry is complete. The 
  1629.           routine also traps for DOS and DOSBIG to prevent accidental 
  1630.           use of those commands.
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.           isdatevalid 
  1684.            
  1685.            
  1686.           Description:  Checks a date to see if it is valid. 
  1687.            
  1688.           Syntax:   testdate.l = isdatevalid.l(date2test.a) 
  1689.            
  1690.           Where: 
  1691.                testdate.l. . receives true for a valid date 
  1692.                date2test.d . is the date to be examined 
  1693.            
  1694.            
  1695.           The routine takes a string of text entered in a valid 
  1696.           Paradox date format and checks to see if it is a valid date. 
  1697.            
  1698.           Often data entry routines, such as the getdate2.d routine in 
  1699.           this package, gathers the date as a string, then converts it 
  1700.           to a date. Although the date routines in this package check 
  1701.           for valid dates, this routine could be useful if you used 
  1702.           other ways to get date information. 
  1703.            
  1704.           The routine returns a true if the date is valid and false if 
  1705.           it is not. 
  1706.            
  1707.           It is important that the date be passed to the routine as a 
  1708.           quoted string or in a string variable. Use of the STRVAL() 
  1709.           function will fail if the date is not valid and cause a 
  1710.           script error.
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.           keygen1 
  1751.            
  1752.            
  1753.           Description:  Generates a random number of up to five digits 
  1754.           for use as a key. Routine also checks key field to make sure 
  1755.           key number is not in use. 
  1756.            
  1757.           Syntax:   newkey.n = keygen1.n (field.a) 
  1758.            
  1759.           Where: 
  1760.                newkey.n. . . receives a unique number 
  1761.                field.a . . . is the key field in the current table 
  1762.            
  1763.            
  1764.           When the nature of the key is not important, keygen1.n can 
  1765.           provide a unique number quickly and easily.  
  1766.            
  1767.           The routine can be called from any field and will search the 
  1768.           key field to see if the number generated exists. If it does 
  1769.           exist, the routine will continue generating numbers until it 
  1770.           finds one not in use. 
  1771.            
  1772.           The routine makes no network provisions, so care should be 
  1773.           taken to lock the number into the field as soon as it is 
  1774.           returned as possible.
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.           keygen2 
  1818.            
  1819.            
  1820.           Description:  Generates a number one larger than the largest 
  1821.           number in the key field. 
  1822.            
  1823.           Syntax:   newkey.n = keygen2.n(field.a) 
  1824.            
  1825.           Where: 
  1826.                newkey.n. . . receives a number  one larger than the largest
  1827.  
  1828.                             number in the key field. 
  1829.                field.a . . . is the key field in the current table 
  1830.            
  1831.            
  1832.           The routine can be called from any field and will find the 
  1833.           largest number in the key field, increment it by one and 
  1834.           return it as the new key. 
  1835.            
  1836.           No network provisions are provided in this routine, care 
  1837.           should be taken to lock the number into the table 
  1838.           immediately after the number is returned. 
  1839.            
  1840.           If no number is in the key field, the program returns 
  1841.           100000. Nearly 900,000 records can be handled in this way.
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.           lastfirst 
  1885.            
  1886.            
  1887.           Description:  Takes a name in the form of John Doe and 
  1888.           returns Doe, John. 
  1889.            
  1890.           Syntax:   newname.a = lastfirst.a (fullname.a) 
  1891.            
  1892.           Where: 
  1893.                newname.a . . is the last name followed  by a comma and the 
  1894.  
  1895.                          first name 
  1896.                fullname.a. . is the full name to be affected 
  1897.            
  1898.            
  1899.           The routine will handle name suffixes such as Jr., Sr., II, 
  1900.           III or IV.
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.           lastlast 
  1952.            
  1953.            
  1954.           Description:  Takes a name in the form of Doe, John and 
  1955.           returns John Doe. 
  1956.            
  1957.           Syntax:   newname.a = lastlast.a(fullname.a) 
  1958.            
  1959.           Where: 
  1960.                newname.a . . is the full name of the person 
  1961.                fullname.a. . is the name in last first form 
  1962.            
  1963.           The routine makes allowances for middle initials and simply 
  1964.           searches for the comma. Once the comma is found, the new 
  1965.           name is built accordingly.
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.           lrtrim 
  2019.            
  2020.            
  2021.           Description:  Trims leading and trailing blanks from a 
  2022.           string. 
  2023.            
  2024.           Syntax:   newstring.a = lrtrim.a(teststring.a) 
  2025.            
  2026.           Where: 
  2027.                newname.a . . is a string without leading or  trailing      
  2028.  
  2029.                   blanks 
  2030.                teststring.a.  is the string to be tested 
  2031.            
  2032.            
  2033.           Particularly when importing fixed length data, blanks can be 
  2034.           part of the string. This routine is used to remove those 
  2035.           ASCII 32 characters. 
  2036.            
  2037.           The routine can be part of a PAL program or can be used 
  2038.           within a scan loop in a miniscript to clean up data in a 
  2039.           table.
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.           ltrim 
  2086.            
  2087.            
  2088.           Description:  Trims leading blanks from a string 
  2089.            
  2090.           Syntax:   newname.a = ltrim.a(teststring.a) 
  2091.            
  2092.           Where: 
  2093.                newname.a . . is a string with leading blanks removed 
  2094.                teststring.a. is a string that may contain leading blanks 
  2095.            
  2096.            
  2097.           The routine removes all ASCII 32 characters from the front 
  2098.           of a string. When only leading blanks exist, the use of 
  2099.           ltrim.a will be faster than lrtrim.a.
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.           msgbox 
  2153.            
  2154.            
  2155.           Description:  Puts a one line message on the screen and 
  2156.           waits for a keypress to continue. 
  2157.            
  2158.           Syntax:   msgbox.u(message.a) 
  2159.            
  2160.           Where: 
  2161.                message.a . . is the message to be displayed 
  2162.            
  2163.            
  2164.           The routine provides a quick way to pass information on to 
  2165.           the user. The routine includes a pause that requires the 
  2166.           user to press a key to continue.  
  2167.            
  2168.           The pause gives the user the chance to read the message 
  2169.           before moving on. Should a keypress be unacceptable, 
  2170.           replacing the event with a sleep command is easily 
  2171.           accomplished by editing the source code.
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.           msgbox2 
  2220.            
  2221.            
  2222.           Description:  Puts a two line message box on the screen and 
  2223.           waits for a keypress before continuing. 
  2224.            
  2225.           Syntax:   msgbox2.u(line1.a, line2.a) 
  2226.            
  2227.           Where: 
  2228.                line1.a . . . is the first line of text to be displayed 
  2229.                line2.a . . . is the second line of text to be displayed 
  2230.            
  2231.            
  2232.           The routine provides a quick way of passing a two line 
  2233.           message on to the user. The routine includes a pause that 
  2234.           requires the user to press a key to continue.
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.           namekey 
  2287.            
  2288.            
  2289.           Description:  Generates a unique key based on the first and 
  2290.           last name of a person. 
  2291.            
  2292.           Syntax:   newkey.a = namekey.a() 
  2293.            
  2294.           Where: 
  2295.                newkey.a. . . receives a key based on a  first and last     
  2296.  
  2297.                    name. 
  2298.            
  2299.            
  2300.           One of the problems with a numeric key is that it does not 
  2301.           sort the names alphabetically. That means users have no clue 
  2302.           as to where a name will occur in a database and must 
  2303.           constantly use locate commands. 
  2304.            
  2305.           The namekey.a routine assumes there are two fields in the 
  2306.           current table named "last name" and "first name." From those 
  2307.           it constructs key of no more than 12 characters. 
  2308.            
  2309.           The key takes the first eight letters of the last name and 
  2310.           the first four letters of the first name and puts them 
  2311.           together. In most cases this will provide an accurate 
  2312.           sorting. The problem comes when two people of the same name 
  2313.           are entered into the database. 
  2314.            
  2315.           To defeat this problem, the routine goes to the first field 
  2316.           in the database -- always the key field -- and checks to see 
  2317.           if the newly created key exists. If so, it generates a 
  2318.           random two-digit number and replaces the last two characters 
  2319.           of the name field with it. 
  2320.            
  2321.           For example, if you have a person in your database by the 
  2322.           name of Howard Johnston, the original key would be: 
  2323.           JohnstonHowa. If a second Howard Johnston were added, the 
  2324.           key might look like: Johnst24Howa.  
  2325.            
  2326.           While this could cause some alphabetizing problems, the 
  2327.           solution would be to have a key field wide enough to 
  2328.           accommodate any possibility. Since Paradox works best with 
  2329.           narrow tables, the routine was set for a maximum of 12 
  2330.           characters. This still allows for up to 100 people (00 
  2331.           through 99) with the same name. 
  2332.            
  2333.           The routine makes no provision for network use and can only 
  2334.           be called after the last name and first name fields have 
  2335.           been filled. Care should be taken to post the key as soon as 
  2336.           possible after the routine has been called to avoid 
  2337.           potential conflicts on a network. 
  2338.            
  2339.           Changes can easily be made in the source code in case the 
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.           last name and first name fields have different names.
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385.  
  2386.  
  2387.  
  2388.  
  2389.  
  2390.  
  2391.  
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.           numbox 
  2421.            
  2422.            
  2423.           Description:  Puts a dialog box with headline on the screen 
  2424.           so the user can enter a number. 
  2425.            
  2426.           Syntax:   newnumber.n = numbox.n(headline.a) 
  2427.            
  2428.           Where: 
  2429.                newnumber.n . receives the number entered by the user 
  2430.                headline.a. . is the headline to put on the box 
  2431.            
  2432.            
  2433.           The routine puts a dialog box on the screen and allows the 
  2434.           user to enter a number. Space for a headline is provided to 
  2435.           prompt the user for what number to enter. The box is sized 
  2436.           to accommodate the length of the headline.
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.           numonly 
  2488.            
  2489.            
  2490.           Description:  Searches through a string and removes any 
  2491.           character that is not a number except a period. 
  2492.            
  2493.           Syntax:   newnumber.n = numonly.a(numberstring.a) 
  2494.            
  2495.           Where: 
  2496.                newnumber.n . receives a number as a string variable 
  2497.                numberstring.a. is a string 
  2498.            
  2499.            
  2500.           There are times when non-numerical data needs to be stripped 
  2501.           out so that a number can be placed either into a numeric 
  2502.           variable or a numeric field. 
  2503.            
  2504.           The numonly.a routine strips out all string values except 
  2505.           periods. A change in the source code can allow for the 
  2506.           stripping of periods also. 
  2507.            
  2508.           An example of this use might be to strip the dashes out of a 
  2509.           telephone number or social security number so the data can 
  2510.           be stored in a smaller numeric field. Of course the dashes 
  2511.           would have to be reinserted when the data is read, but the 
  2512.           savings in disk space may be worth the extra processor time 
  2513.           in doing so. 
  2514.            
  2515.           Note that the routine returns the data as a string. It can 
  2516.           easily be converted to a number with the PAL NUMVAL 
  2517.           function.
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.           popcal 
  2555.            
  2556.            
  2557.           Description:  A pop-up calendar program written entirely in 
  2558.           PAL. 
  2559.            
  2560.           Syntax:   popcal.u () 
  2561.            
  2562.            
  2563.           The routine puts a calendar showing the current month in the 
  2564.           upper right hand side of the screen. 
  2565.            
  2566.           The user may press the left and right arrow keys to move 
  2567.           forward or behind in months. The user presses the ESC key to 
  2568.           leave the routine. The system date must be accurately set 
  2569.           for the routine to work correctly. 
  2570.            
  2571.           The routine was intended to be called from a SETKEY command, 
  2572.           however it can just as easily be called from a program when 
  2573.           the user is asked to input a number.
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.           popval 
  2622.            
  2623.            
  2624.           Description:  A pop-up valcheck menu that allows the user to 
  2625.           select an appropriate valcheck for the current field. 
  2626.            
  2627.           Syntax:   popval.a () 
  2628.            
  2629.            
  2630.           The routine presents a menu of 22 possible valchecks and 
  2631.           sets the valcheck for the current field. 
  2632.            
  2633.           The user presses the arrow keys to move the light bar to the 
  2634.           appropriate valcheck, then presses ENTER to select it. 
  2635.            
  2636.           Once selected the routine sets that valcheck for the current 
  2637.           field. The user must be in edit mode for the routine to 
  2638.           work.
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.           remblank 
  2689.            
  2690.            
  2691.           Description:  Removes all spaces from a string. 
  2692.            
  2693.           Syntax:   newstring.a = remblanks.a(oldstring.a) 
  2694.            
  2695.           Where: 
  2696.                newstring.a . receives a string without blank spaces 
  2697.                oldstring.a . is a string that may contain blanks 
  2698.            
  2699.            
  2700.           Removes all ASCII 32 characters from a string.
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.           restorerec 
  2756.            
  2757.            
  2758.           Description:  Restores last record deleted using the 
  2759.           delrec.u routine. 
  2760.            
  2761.           Syntax:   restorerec.u () 
  2762.            
  2763.            
  2764.           The most recent record deleted using the delrec.u routine is 
  2765.           held in an array in memory until the user leaves Paradox. 
  2766.            
  2767.           The restorerec.u routine will restore that record even if 
  2768.           the editing session has ended and the user is in main mode. 
  2769.           The table must be on the workspace at the time the 
  2770.           restoration is requested, but it may have been removed 
  2771.           previously. 
  2772.            
  2773.           The routine will work only for the most recent deletion.
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783.  
  2784.  
  2785.  
  2786.  
  2787.  
  2788.  
  2789.  
  2790.  
  2791.  
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.           rtrim 
  2823.            
  2824.            
  2825.           Description:  Trims trailing spaces from a string. 
  2826.            
  2827.           Syntax:   newstring.a = rtrim.a (oldstring.a) 
  2828.            
  2829.           Where: 
  2830.                newstring.a . receives a string without trailing spaces 
  2831.                oldstring.a . is a string that may have trailing spaces 
  2832.            
  2833.            
  2834.           The routine will trim all trailing ASCII 32 characters from 
  2835.           a string. It will be faster than lrtrim.a if only trailing 
  2836.           are expected.
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.           statusbar 
  2890.            
  2891.            
  2892.           Description:  A moving bar and message that graphically 
  2893.           shows the user how far a process has progressed. 
  2894.            
  2895.           Syntax:   statusbar.u(msg.a, row.n, col.n, length.n, 
  2896.           counter.n, start.n, end.n) 
  2897.            
  2898.           Where: 
  2899.                msg.a . . . . is the message to display above the bar 
  2900.                row.n . . . . is the row where the bar is to be displayed 
  2901.                col.n . . . . is the column where the bar is to begin 
  2902.                length.n. . . is the length of the bar 
  2903.                counter.n . . is the counter position in the loop 
  2904.                start.n . . . is the beginning of the loop 
  2905.                end.n . . . . is where the loop will end 
  2906.            
  2907.            
  2908.           Despite the number of variables required in a call to 
  2909.           statusbar, it is very easy to use. 
  2910.            
  2911.           The routine is intended to be used in a FOR/NEXT or 
  2912.           WHILE/ENDWHILE loop where the number of passes through the 
  2913.           loop are known. 
  2914.            
  2915.           Here is a sample of how statusbar.u might be used: 
  2916.            
  2917.                FOR x from 1 to 500 
  2918.             statusbar.u("Processing data", 5, 1, 20, x, 1, 500) 
  2919.             .... 
  2920.             .... 
  2921.             .... 
  2922.             ENDFOR 
  2923.            
  2924.           The routine will calculate the percentage of how far the 
  2925.           loop the counter gone, apply that percentage to the length 
  2926.           of the bar, then display the bar. With each pass through the 
  2927.           loop, the calculation is updated, allowing the use of the 
  2928.           STEP statement in the FOR loop. 
  2929.            
  2930.           While the routine will handle any length for the bar up to 
  2931.           one screen width.
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.           striphigh 
  2957.            
  2958.            
  2959.           Description:  Strips all ASCII characters above 126 out of a 
  2960.           string. 
  2961.            
  2962.           Syntax:   newstring.a = striphigh.a(oldstring.a) 
  2963.            
  2964.           Where: 
  2965.                newstring.a . receives ASCII characters below 127 
  2966.                oldstring.a . is a string 
  2967.            
  2968.            
  2969.           The routine will strip all high ASCII characters out of a 
  2970.           string that may cause problems with some printers.
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.  
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.           textbox 
  3024.            
  3025.            
  3026.           Description:  Prompts the user to enter a line of text and 
  3027.           formats it to all caps, all lower case or with only the 
  3028.           first letter of each word capitalized. 
  3029.            
  3030.           Syntax: newstring.a = textbox.a(headline.a, length.n, 
  3031.           styl.n) 
  3032.            
  3033.           Where: 
  3034.                newstring.a . receives a formatted string of text 
  3035.                headline.a. . is the headline to place on the box 
  3036.                length.n. . . is the number of characters to be entered 
  3037.                styl.n. . . . is the style to format the new text 
  3038.            
  3039.            
  3040.           Using a dialog box, textbox.a prompts the user for a one 
  3041.           line text string. A headline can be put on the box to prompt 
  3042.           the user as to what text to enter. The length.n variable 
  3043.           determines how long the string can be. 
  3044.            
  3045.           If styl.n is set to 1, the text will be returned to 
  3046.           newstring.a in all capitals. If it is set to 2, the string 
  3047.           will be returned in all lower case. If it is set to 3, the 
  3048.           first letter of each word will be capitalized. If any other 
  3049.           number is used, the text will be returned unaltered. 
  3050.            
  3051.           The routine also uses the lrtrim.a function to trim any 
  3052.           leading or trailing from the string. 
  3053.            
  3054.           If the user exits without entering any text, the routine 
  3055.           returns a value of false.
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.           waitkeypress 
  3091.            
  3092.            
  3093.           Description:  Creates a pause until the user presses a key. 
  3094.            
  3095.           Syntax:   waitkeypress.v () 
  3096.                 
  3097.                or 
  3098.            
  3099.                charpicked.a = waitkeypress.v () 
  3100.            
  3101.           Where: 
  3102.                charpicked.a.  is the key pressed 
  3103.            
  3104.            
  3105.           The routine is used to halt program execution until a key is 
  3106.           pressed. If knowing the key is important, the function 
  3107.           version of the routine can be used.
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.           wipes 
  3158.            
  3159.            
  3160.           Description:  A demonstration program to show how wipes can 
  3161.           be added to a program. 
  3162.            
  3163.           Syntax:   wipes.u () 
  3164.            
  3165.            
  3166.           Wipes is included only to show that wipes can be done with 
  3167.           PAL. The source code shows how wipes can be written into 
  3168.           programs.^Z
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189.  
  3190.  
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198.  
  3199.  
  3200.  
  3201.  
  3202.  
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.  
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.