home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / paradox / library / manual.doc < prev    next >
Text File  |  1992-01-12  |  49KB  |  3,169 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                   INTRODUCTION 
  8.            
  9.            
  10.            
  11.           Welcome to PDOXLIB! 
  12.            
  13.           PDOXLIB is a collection of more than 40 Paradox routines 
  14.           written entirely in PAL Version 3.5. 
  15.            
  16.           The routines range from the simple to the complex and from 
  17.           the workhorses to the fun. 
  18.            
  19.           You'll find lots of routines that prompt the user for 
  20.           information in different ways. You'll find routines that 
  21.           format data and ones that remove or replace unwanted 
  22.           characters. 
  23.            
  24.           But you'll also find a handy gauge routine that keeps the 
  25.           user informed of the progress of your calculations. A crawl 
  26.           routine prints an attractive message across the bottom of 
  27.           the screen. 
  28.            
  29.           There's even a pop-up calendar written entirely in PAL! Few 
  30.           busy programmers would take the time to write such a 
  31.           routine, but it's the type of finishing touch that adds 
  32.           class and convenience to your hard-working application. 
  33.            
  34.           PDOXLIB routines can be used as is or the source code can be 
  35.           modified to meet your own needs. The code is liberally 
  36.           commented, so making your own changes is easy. 
  37.            
  38.           But remember, PDOXLIB is shareware. If you use it you have a 
  39.           responsibility to pay for it. There are plenty of good 
  40.           reasons to register PDOXLIB, but the point of shareware is 
  41.           to give you the chance to try out the software and see if it 
  42.           meets your needs. If so, then it's time to put the check in 
  43.           the mail. 
  44.            
  45.                          WHY SHOULD I REGISTER PDOXLIB? 
  46.            
  47.           The best reason to register PDOXLIB is that it's the right 
  48.           thing to do. Hard work went into the creation of PDOXLIB and 
  49.           just as you wouldn't want your work stolen, neither does the 
  50.           author of PDOXLIB. 
  51.            
  52.           But from a practical standpoint, why not register it? The 
  53.           cost is only $20 plus postage and handling. Compared to the 
  54.           cost of writing one or two of these routines yourself, it's 
  55.           downright cheap. 
  56.            
  57.           The source code alone is worth the price. You may also find 
  58.           you love one of the routines, but hate the choice of colors. 
  59.           With the source code, the full range of available colors is 
  60.           open to you. 
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.            
  74.           From a practical standpoint, you'll find the PDOXLIB library 
  75.           to be quite large. In fact, it's really too large for 
  76.           practical use. Adding the library to an existing application 
  77.           would slow your program down as the computer searches 
  78.           through another 100,000 bytes looking for a routine. 
  79.            
  80.           With the source code, you add only the routines you need to 
  81.           your libraries and keep your programs running at their peak 
  82.           speeds. 
  83.            
  84.           So put PDOXLIB through its paces and if it works for you, 
  85.           then drop a check in the mail. 
  86.            
  87.           We'd also welcome your comments, suggestions for changes in 
  88.           the routines or requests for new routines. 
  89.            
  90.           And if you don't like a routine, tell us that too. We want 
  91.           PDOXLIB to be a helpful addition to your toolbox. 
  92.            
  93.           And if you're a beginning PAL programmer, reading the 
  94.           PDOXLIB source code can spur your creativity to write 
  95.           routines of your own. 
  96.            
  97.           PDOXLIB is distributed with the source code, but it is 
  98.           password protected. When we receive your payment, we will 
  99.           provide you with the password that will give you access to 
  100.           the source code. 
  101.            
  102.            
  103.                            HOW DO I REGISTER PDOXLIB? 
  104.            
  105.           First run the routine code () that is in the PDOXLIB 
  106.           library. The routine provides you with a code word to give 
  107.           us that tells us which password unlocks your files. 
  108.            
  109.           Do this by selection miniscript from the debug menu (ALT- 
  110.           F10), then typing the following: autolib = "pdoxlib" code () 
  111.            
  112.           The press the ENTER key and the code word should appear on 
  113.           your screen. 
  114.            
  115.           Why the code? We are tracking which BBS systems give us best 
  116.           distribution and buyers. The code tells us on which BBS your 
  117.           version of PDOXLIB was originally uploaded. Since each BBS 
  118.           we used has a different password, it's important for us to 
  119.           know it. 
  120.            
  121.           Send us $20 plus the code word that prints on your screen. 
  122.           Upon receipt of your payment, we'll send you the password. 
  123.           If you wish to have the password telephoned to you or have 
  124.           it sent via CompuServe or Exec-PC, please provide the 
  125.           appropriate telephone numbers, mail addresses, and log-on 
  126.           names we need to contact you. 
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.           atprint 
  140.            
  141.            
  142.           Description: Prints a string of text in a specified 
  143.           attribute at a row and column position on the canvas. 
  144.            
  145.           Syntax:   atprint.u(text.a, attrib.n, row.n, col.n) 
  146.            
  147.           Where: 
  148.                text.a. . . . is the text to be printed 
  149.                attrib.n. . . is the attribute number for the text. 
  150.                row.n . . . . is the row where the text is to be printed. 
  151.                col.n . . . . is the column where text is to be printed. 
  152.            
  153.            
  154.           While any beginning PAL programmer can handle the writing of 
  155.           this code, this routine provides a code-reusable way of 
  156.           handling a regular chore. In fact, the process is so routine 
  157.           many programmers would not even think of writing such a 
  158.           routine.
  159.  
  160.  
  161.  
  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.           bgetdate 
  206.            
  207.            
  208.           Description: Prompts the user for a date via the dialog box. 
  209.           The procedure uses PAL's ACCEPT statement for getting data. 
  210.            
  211.           Syntax:   newdate.d = bgetdate.d () 
  212.            
  213.           Where: 
  214.                newdate.d . . receives a new, valid date 
  215.            
  216.            
  217.           This routine pops a dialog box into the center of the screen 
  218.           and prompts the user to enter a day in the MM/DD/YY format. 
  219.           Because ACCEPT is used, only a valid date may be entered.
  220.  
  221.  
  222.  
  223.  
  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.           bgetdate2 
  272.            
  273.            
  274.           Description: Prompts the user via a dialog box for a date in 
  275.           the MM/DD/YY format. It uses a more elegant way of gathering 
  276.           the data than does the PAL ACCEPT command. 
  277.            
  278.           Syntax:   newdate.d = bgetdate2.d () 
  279.            
  280.           Where: 
  281.                newdate.d . . receives a new, valid date 
  282.            
  283.            
  284.           Although Paradox provides validation checks for field data 
  285.           entry, there are times, such as when prompting for query 
  286.           information, where a dialog box is helpful. This routine 
  287.           pops a box onto the center of the screen and prompts the 
  288.           user to enter a day in the MM/DD/YY format. The routine will 
  289.           only accept valid dates, although the user may press ESC to 
  290.           leave the routine.
  291.  
  292.  
  293.  
  294.  
  295.  
  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.           bgetphone 
  338.            
  339.            
  340.           Description: Prompts the user for a telephone number via a 
  341.           dialog box on the screen. It uses the PAL ACCEPT command and 
  342.           requires an area code entry. The routine returns a string in 
  343.           the format: NNN-NNN-NNNN. 
  344.            
  345.           Syntax:   phonenumber.a = bgetphone.a () 
  346.            
  347.           Where: 
  348.                phonenumber.a .receives a telephone number 
  349.            
  350.            
  351.           Although Paradox provides validation checks for field data 
  352.           entry, there are times, such as when prompting for query 
  353.           information, where a dialog box is helpful. This routine 
  354.           pops a box onto the center of the screen and prompts the 
  355.           user to enter a telephone number in the NNN-NNN-NNNN format.
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  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.           bgetphone2 
  404.            
  405.            
  406.           Description: Prompts the user for a telephone number via a 
  407.           dialog box on the screen. It uses a more visual way of 
  408.           gathering the information than is possible with the PAL 
  409.           ACCEPT command. 
  410.            
  411.           Syntax:   phonenumber.a = bgetphone2.a() 
  412.            
  413.           Where: 
  414.                phonenumber.a .receives a formatted telephone number 
  415.            
  416.            
  417.           Although Paradox provides validation checks for field data 
  418.           entry, there are times, such as when prompting for query 
  419.           information, where a dialog box is helpful. This routine 
  420.           pops a box onto the center of the screen and prompts the 
  421.           user to enter a telephone number in the (___) ___-____ 
  422.           format. The user may press ESC to leave the routine.
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  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.           bgetssn 
  470.            
  471.            
  472.           Description: Prompts the user for a social security number 
  473.           via a dialog box on the screen. It uses the PAL ACCEPT 
  474.           command. The routine returns a string in the format: NNN-NN- 
  475.           NNNN. 
  476.            
  477.           Syntax:   ssn.a = bgetssn.a () 
  478.            
  479.           Where: 
  480.                ssn.a . . . . receives a formatted social security number 
  481.            
  482.            
  483.           Although Paradox provides validation checks for field data 
  484.           entry, there are times, such as when prompting for query 
  485.           information, where a dialog box is helpful. This routine 
  486.           pops a box onto the center of the screen and prompts the 
  487.           user to enter a social security number in the NNN-NN-NNNN 
  488.           format.
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  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.           bgetssn2 
  536.            
  537.            
  538.           Description: Prompts the user for a social security number 
  539.           via a dialog box on the screen. It uses a more visual way of 
  540.           gathering the information than is possible with the PAL 
  541.           ACCEPT command. 
  542.            
  543.           Syntax:   ssn.a = bgetssn2.a () 
  544.            
  545.           Where: 
  546.                ssn.a . . . . receives a formatted social security number 
  547.            
  548.            
  549.           Although Paradox provides validation checks for field data 
  550.           entry, there are times, such as when prompting for query 
  551.           information, where a dialog box is helpful. This routine 
  552.           pops a box onto the center of the screen and prompts the 
  553.           user to enter a social security number in the NNN-NN-NNNN 
  554.           format. The user may press ESC to leave the routine.
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  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.           calcage 
  602.            
  603.            
  604.           Description: Using a date of birth, the routine returns the 
  605.           person's age. 
  606.            
  607.           Syntax:   currentage.n = calcage.n (dob.d) 
  608.            
  609.           Where: 
  610.                dob.d . . . . is the person's birth date 
  611.                currentage.n. receives the age 
  612.            
  613.            
  614.           The routine can be used when an age instead of a date is 
  615.           needed. It can also be used to fill in an age field if only 
  616.           a date of birth field exists. If procedures are allowed in 
  617.           forms in future versions of Paradox, the routine might also 
  618.           be useful to keep an accurate running age of a person when 
  619.           only the date of birth is available.
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  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.           copyfile 
  668.            
  669.            
  670.           Description: Copies a file to a new disk or directory. 
  671.            
  672.           Syntax:   copyfile.u () 
  673.            
  674.            
  675.           This routine can be used to copy an individual file to a 
  676.           disk or new directory. If used on a table, it will not copy 
  677.           the related family. The PAL COPY command should be used for 
  678.           that purpose. However this does provide an easy way of 
  679.           copying a file without overtly shelling out to DOS. The 
  680.           routine provides a Paradox-style menu of files in the 
  681.           current directory, asks for a destination, checks to see if 
  682.           the destination is valid, then uses DOS to actually copy the 
  683.           file. The routine does not check to see if there is 
  684.           sufficient space to copy the file, however.
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  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.           crawl 
  734.            
  735.            
  736.           Description: Displays a message that crawls across the 
  737.           bottom of the screen to let the user know that work is in 
  738.           progress. 
  739.            
  740.           Syntax:   crawl.u(message.a) 
  741.            
  742.           Where: 
  743.                message.a . . is the message to be displayed on the crawl 
  744.            
  745.            
  746.           Crawl is intended to a included in a loop such as WHILE or 
  747.           FOR. With each pass through the loop the program determines 
  748.           the current position of the message and advances it one 
  749.           column. 
  750.            
  751.           For example: 
  752.            
  753.                While true 
  754.                   crawl.u("Processing data") 
  755.                   .... 
  756.                   .... 
  757.                   .... 
  758.                Endwhile 
  759.            
  760.           While the program is relatively speedy, it does include a 
  761.           short pause to make the message readable. For short 
  762.           processing times, the routine should not pose a problem, but 
  763.           if the loop is expected to take some time, crawl.u will 
  764.           probably provide too much of a delay.
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.           delrec 
  800.            
  801.            
  802.           Description:  A routine to delete the record currently 
  803.           hosting the cursor. 
  804.            
  805.           Syntax:   delrec.u () 
  806.            
  807.            
  808.           The routine will delete the current record after prompting 
  809.           the user to confirm that choice. The routine can be called 
  810.           from main, edit or coedit modes. If called in main mode, the 
  811.           routine will return the user to main mode at the conclusion. 
  812.            
  813.           One advantage of the routine is that is saves the most 
  814.           recently deleted record in memory. By using the companion 
  815.           routine, saverec.u, the record can be restored. This is true 
  816.           even if the deletion was made in coedit mode, the edit 
  817.           session was ended with F2 and the table was removed from the 
  818.           screen. 
  819.            
  820.           Only the most recent deletion is held in memory and that is 
  821.           lost when the user exits Paradox.
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  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.           fullname 
  866.            
  867.            
  868.           Description:  Returns the full path name of the current 
  869.           directory. 
  870.            
  871.           Syntax:   pathname.a = fullname.a(filename.a, styl.n) 
  872.            
  873.           Where: 
  874.                filename.a. . is a file in the current directory 
  875.                styl.n. . . . selects single or double backslashes 
  876.                pathname.a. . receives the full path name 
  877.            
  878.            
  879.           When changing directories within an application, it is often 
  880.           useful to retain valid path names for calling tables or 
  881.           reports later. This utility allows you to capture that 
  882.           information in a variable.  
  883.            
  884.           Instead of the filename.a, the user can use the PAL function 
  885.           TABLE (). The routine will then return the full path name of 
  886.           a table, but without the .DB file extension. Of course the 
  887.           table must be on the workspace for the TABLE () function to 
  888.           work properly. 
  889.            
  890.           Some Paradox functions also require a double backslash in 
  891.           which to work properly. By entering a value of zero, the 
  892.           function will return the path with double backslashes. Any 
  893.           other value will return single backslashes.
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.           getdate 
  932.            
  933.            
  934.           Description:  Prompts the user for a date at the current 
  935.           cursor position. 
  936.            
  937.           Syntax:   newdate.d = getdate.d() 
  938.            
  939.           Where: 
  940.                newdate.d . . receives a date in the MM/DD/YY format 
  941.            
  942.            
  943.           Using the ACCEPT command, getdate.d prompts the user for a 
  944.           date. Care must be taken before calling getdate.d to place 
  945.           the cursor in the correct position. The routine offers a 
  946.           plain vanilla way of getting a date. For a more elegant way, 
  947.           see getdate2.
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  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.           getdate2 
  998.            
  999.            
  1000.           Description:  A more visual way of getting a date from the 
  1001.           user at the current cursor position. 
  1002.            
  1003.           Syntax:   newdate.d = getdate2.d () 
  1004.            
  1005.           Where: 
  1006.                newdate.d . . receives a date in the MM/DD/YY format 
  1007.            
  1008.            
  1009.           Unlike getdate.d, getdate2.d provides an image on the screen 
  1010.           for the user to complete. By providing that image, it helps 
  1011.           the user determine how the date should be entered. The 
  1012.           routine checks to see if the date is valid before allowing 
  1013.           the user to leave, however the user may press ESC to leave 
  1014.           the routine. If so, the routine returns "ESC" to newdate.d.
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  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.           getphone 
  1064.            
  1065.            
  1066.           Description:  Prompts the user for a telephone number at the 
  1067.           current cursor position. 
  1068.            
  1069.           Syntax:   newnumber.a = getphone.a () 
  1070.            
  1071.           Where: 
  1072.                newnumber.a . receives a telephone number. 
  1073.            
  1074.            
  1075.           The routine uses PAL's ACCEPT command to return a telephone 
  1076.           number in the ###-##-#### format.
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  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.           getphone2 
  1130.            
  1131.            
  1132.           Description:  Provides a more visual way of prompting the 
  1133.           user for a telephone number at the current cursor location. 
  1134.            
  1135.           Syntax:   newnumber.a = getphone2.a () 
  1136.            
  1137.           Where: 
  1138.                newnumber.a . receives a telephone number. 
  1139.            
  1140.            
  1141.           getphone2.a provides a more visual way to prompt the user 
  1142.           for a telephone number. The routine requires numeric input, 
  1143.           but will return ESC if the user escapes out of the routine. 
  1144.           The routine could be easily modified to allow a default area 
  1145.           code, thus speeding data entry. The returned format is ###- 
  1146.           ###-####.
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  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.           getnum 
  1196.            
  1197.            
  1198.           Description:  Prompts the user to enter a number at the 
  1199.           current cursor location. 
  1200.            
  1201.           Syntax:   newnumber.n = getnum.n () 
  1202.            
  1203.           Where: 
  1204.                newnumber.n . receives a number typed in by the user. 
  1205.            
  1206.            
  1207.           This is a simple ACCEPT version of getting a number from the 
  1208.           user. Since the style or format of the number is unknown, no 
  1209.           formatting or validity checking can be done. If the user 
  1210.           leaves the routine without entering a number or by pressing 
  1211.           ESC, the routine returns false.
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  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.           getssn 
  1262.            
  1263.            
  1264.           Description:  Provides a simple way of prompting the user to 
  1265.           enter a social security number at the present cursor 
  1266.           location. 
  1267.            
  1268.           Syntax:   ssn.a = getssn.a () 
  1269.            
  1270.           Where: 
  1271.                ssn.a . . . . receives a social security number. 
  1272.            
  1273.            
  1274.           Using PAL's accept command, this routine provides a quick 
  1275.           way of getting a social security number. ESC is returned if 
  1276.           the user escapes out of the routine. The format of the 
  1277.           number is ###-##-####.
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  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.           getssn2 
  1328.            
  1329.            
  1330.           Description:  Provides a more visual way of prompting the 
  1331.           user to enter a social security number at the current cursor 
  1332.           location. 
  1333.            
  1334.           Syntax:   ssn.a = getssn2.a () 
  1335.            
  1336.           Where: 
  1337.                ssn.a . . . . receives a social security number. 
  1338.            
  1339.            
  1340.           Provides a more visual way of prompting the user for a 
  1341.           social security number. The routine puts an image of the 
  1342.           number in the current cursor location and accepts numbers 
  1343.           from the user. ESC is returned if the user presses the 
  1344.           escape key. The number is returned in the ###-##-#### 
  1345.           format.
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  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.           gettext 
  1394.            
  1395.            
  1396.           Description:  Gets a line of text at the current cursor 
  1397.           location and formats it to all upper case, lower case or 
  1398.           capitalizing the first letter of each word. 
  1399.            
  1400.           Syntax:   newtext.a = gettext.a(length.n, styl.n) 
  1401.            
  1402.           Where: 
  1403.                newtext.a . . receives a formatted string of text 
  1404.                length.n. . . is the maximum length of the string 
  1405.                styl.n. . . . is 1, 2 or 3 to indicate the style desired 
  1406.            
  1407.            
  1408.           The routine prompts the user to input a string of text at 
  1409.           the current cursor location. If the user exits the routine 
  1410.           without entering text or by pressing ESC, the routine 
  1411.           returns false.  
  1412.            
  1413.           The length.n variable tells the routine how much text should 
  1414.           be received from the user. The styl.n variable should be set 
  1415.           to 1 if the text is to be returned in all capitals, 2 if it 
  1416.           is to be all lower case or 3 if the first letter of each 
  1417.           word is to be capitalized. If any other value is entered, 
  1418.           the string is returned unaltered. 
  1419.            
  1420.           The routine also calls the lrtrim.a routine to ensure that 
  1421.           newtext.a receives a string without leading or trailing 
  1422.           spaces.
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.           hmsgbox 
  1460.            
  1461.            
  1462.           Description:  Puts a box on the screen with a headline and a 
  1463.           one line message. The user is prompted for a keypress before 
  1464.           the routine ends. 
  1465.            
  1466.           Syntax:   hmsgbox.u(hed.a, message.a) 
  1467.            
  1468.           Where: 
  1469.                hed.a . . . . is the headline at the top of the box 
  1470.                message.a . . is the one line message 
  1471.            
  1472.            
  1473.           The routine provides a convenient way of passing a brief 
  1474.           message to the user. Both headline and message can be any 
  1475.           length, but the message should be longer than the headline. 
  1476.            
  1477.           Once the message is placed on the screen, the user to told 
  1478.           to press any key to continue as a way of allowing him or her 
  1479.           to control program flow.
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.           hmsgbox2 
  1526.            
  1527.            
  1528.           Description:  Puts a box on the screen with a headline and a 
  1529.           two line message. The user is prompted for a keypress before 
  1530.           the routine ends. 
  1531.            
  1532.           Syntax:   hmsgbox2.u(hed.a, line1.a, line2.a) 
  1533.            
  1534.           Where: 
  1535.                hed.a . . . . is the headline to be printed 
  1536.                line1.a . . . is the first line to be printed in the box 
  1537.                line2.a . . . is the second line to be printed in the box 
  1538.            
  1539.            
  1540.           The routine provides a convenient was of passing a two-line 
  1541.           message to the user. Both line1.a and line2.a can be of any 
  1542.           length, but at least one of the lines should be longer than 
  1543.           the headline. 
  1544.            
  1545.           Once the message is placed on the screen, the user is told 
  1546.           to press any key to continue as a way of allowing him or her 
  1547.           to control program flow.
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.           insertrec 
  1592.            
  1593.            
  1594.           Description:  Allows the user to enter a new record. 
  1595.            
  1596.           Syntax:   insertrec.u () 
  1597.            
  1598.            
  1599.           The routine works from main, edit or coedit modes and opens 
  1600.           a new record for the user to enter. 
  1601.            
  1602.           The routine puts the new record into a WAIT RECORD and 
  1603.           prompts the user to press F2 when the entry is complete. The 
  1604.           routine also traps for DOS and DOSBIG to prevent accidental 
  1605.           use of those commands.
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  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.           isdatevalid 
  1658.            
  1659.            
  1660.           Description:  Checks a date to see if it is valid. 
  1661.            
  1662.           Syntax:   testdate.l = isdatevalid.l(date2test.a) 
  1663.            
  1664.           Where: 
  1665.                testdate.l. . receives true for a valid date 
  1666.                date2test.d . is the date to be examined 
  1667.            
  1668.            
  1669.           The routine takes a string of text entered in a valid 
  1670.           Paradox date format and checks to see if it is a valid date. 
  1671.            
  1672.           Often data entry routines, such as the getdate2.d routine in 
  1673.           this package, gathers the date as a string, then converts it 
  1674.           to a date. Although the date routines in this package check 
  1675.           for valid dates, this routine could be useful if you used 
  1676.           other ways to get date information. 
  1677.            
  1678.           The routine returns a true if the date is valid and false if 
  1679.           it is not. 
  1680.            
  1681.           It is important that the date be passed to the routine as a 
  1682.           quoted string or in a string variable. Use of the STRVAL() 
  1683.           function will fail if the date is not valid and cause a 
  1684.           script error.
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.           keygen1 
  1724.            
  1725.            
  1726.           Description:  Generates a random number of up to five digits 
  1727.           for use as a key. Routine also checks key field to make sure 
  1728.           key number is not in use. 
  1729.            
  1730.           Syntax:   newkey.n = keygen1.n (field.a) 
  1731.            
  1732.           Where: 
  1733.                newkey.n. . . receives a unique number 
  1734.                field.a . . . is the key field in the current table 
  1735.            
  1736.            
  1737.           When the nature of the key is not important, keygen1.n can 
  1738.           provide a unique number quickly and easily.  
  1739.            
  1740.           The routine can be called from any field and will search the 
  1741.           key field to see if the number generated exists. If it does 
  1742.           exist, the routine will continue generating numbers until it 
  1743.           finds one not in use. 
  1744.            
  1745.           The routine makes no network provisions, so care should be 
  1746.           taken to lock the number into the field as soon as it is 
  1747.           returned as possible.
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.           keygen2 
  1790.            
  1791.            
  1792.           Description:  Generates a number one larger than the largest 
  1793.           number in the key field. 
  1794.            
  1795.           Syntax:   newkey.n = keygen2.n(field.a) 
  1796.            
  1797.           Where: 
  1798.                newkey.n. . . receives a number  one larger than the largest
  1799.  
  1800.                             number in the key field. 
  1801.                field.a . . . is the key field in the current table 
  1802.            
  1803.            
  1804.           The routine can be called from any field and will find the 
  1805.           largest number in the key field, increment it by one and 
  1806.           return it as the new key. 
  1807.            
  1808.           No network provisions are provided in this routine, care 
  1809.           should be taken to lock the number into the table 
  1810.           immediately after the number is returned. 
  1811.            
  1812.           If no number is in the key field, the program returns 
  1813.           100000. Nearly 900,000 records can be handled in this way.
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.           lastfirst 
  1856.            
  1857.            
  1858.           Description:  Takes a name in the form of John Doe and 
  1859.           returns Doe, John. 
  1860.            
  1861.           Syntax:   newname.a = lastfirst.a (fullname.a) 
  1862.            
  1863.           Where: 
  1864.                newname.a . . is the last name followed  by a comma and the 
  1865.  
  1866.                          first name 
  1867.                fullname.a. . is the full name to be affected 
  1868.            
  1869.            
  1870.           The routine will handle name suffixes such as Jr., Sr., II, 
  1871.           III or IV.
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.           lastlast 
  1922.            
  1923.            
  1924.           Description:  Takes a name in the form of Doe, John and 
  1925.           returns John Doe. 
  1926.            
  1927.           Syntax:   newname.a = lastlast.a(fullname.a) 
  1928.            
  1929.           Where: 
  1930.                newname.a . . is the full name of the person 
  1931.                fullname.a. . is the name in last first form 
  1932.            
  1933.           The routine makes allowances for middle initials and simply 
  1934.           searches for the comma. Once the comma is found, the new 
  1935.           name is built accordingly.
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.           lrtrim 
  1988.            
  1989.            
  1990.           Description:  Trims leading and trailing blanks from a 
  1991.           string. 
  1992.            
  1993.           Syntax:   newstring.a = lrtrim.a(teststring.a) 
  1994.            
  1995.           Where: 
  1996.                newname.a . . is a string without leading or  trailing      
  1997.  
  1998.                   blanks 
  1999.                teststring.a.  is the string to be tested 
  2000.            
  2001.            
  2002.           Particularly when importing fixed length data, blanks can be 
  2003.           part of the string. This routine is used to remove those 
  2004.           ASCII 32 characters. 
  2005.            
  2006.           The routine can be part of a PAL program or can be used 
  2007.           within a scan loop in a miniscript to clean up data in a 
  2008.           table.
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.           ltrim 
  2054.            
  2055.            
  2056.           Description:  Trims leading blanks from a string 
  2057.            
  2058.           Syntax:   newname.a = ltrim.a(teststring.a) 
  2059.            
  2060.           Where: 
  2061.                newname.a . . is a string with leading blanks removed 
  2062.                teststring.a. is a string that may contain leading blanks 
  2063.            
  2064.            
  2065.           The routine removes all ASCII 32 characters from the front 
  2066.           of a string. When only leading blanks exist, the use of 
  2067.           ltrim.a will be faster than lrtrim.a.
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.           msgbox 
  2120.            
  2121.            
  2122.           Description:  Puts a one line message on the screen and 
  2123.           waits for a keypress to continue. 
  2124.            
  2125.           Syntax:   msgbox.u(message.a) 
  2126.            
  2127.           Where: 
  2128.                message.a . . is the message to be displayed 
  2129.            
  2130.            
  2131.           The routine provides a quick way to pass information on to 
  2132.           the user. The routine includes a pause that requires the 
  2133.           user to press a key to continue.  
  2134.            
  2135.           The pause gives the user the chance to read the message 
  2136.           before moving on. Should a keypress be unacceptable, 
  2137.           replacing the event with a sleep command is easily 
  2138.           accomplished by editing the source code.
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.           msgbox2 
  2186.            
  2187.            
  2188.           Description:  Puts a two line message box on the screen and 
  2189.           waits for a keypress before continuing. 
  2190.            
  2191.           Syntax:   msgbox2.u(line1.a, line2.a) 
  2192.            
  2193.           Where: 
  2194.                line1.a . . . is the first line of text to be displayed 
  2195.                line2.a . . . is the second line of text to be displayed 
  2196.            
  2197.            
  2198.           The routine provides a quick way of passing a two line 
  2199.           message on to the user. The routine includes a pause that 
  2200.           requires the user to press a key to continue.
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.           namekey 
  2252.            
  2253.            
  2254.           Description:  Generates a unique key based on the first and 
  2255.           last name of a person. 
  2256.            
  2257.           Syntax:   newkey.a = namekey.a() 
  2258.            
  2259.           Where: 
  2260.                newkey.a. . . receives a key based on a  first and last     
  2261.  
  2262.                    name. 
  2263.            
  2264.            
  2265.           One of the problems with a numeric key is that it does not 
  2266.           sort the names alphabetically. That means users have no clue 
  2267.           as to where a name will occur in a database and must 
  2268.           constantly use locate commands. 
  2269.            
  2270.           The namekey.a routine assumes there are two fields in the 
  2271.           current table named "last name" and "first name." From those 
  2272.           it constructs key of no more than 12 characters. 
  2273.            
  2274.           The key takes the first eight letters of the last name and 
  2275.           the first four letters of the first name and puts them 
  2276.           together. In most cases this will provide an accurate 
  2277.           sorting. The problem comes when two people of the same name 
  2278.           are entered into the database. 
  2279.            
  2280.           To defeat this problem, the routine goes to the first field 
  2281.           in the database -- always the key field -- and checks to see 
  2282.           if the newly created key exists. If so, it generates a 
  2283.           random two-digit number and replaces the last two characters 
  2284.           of the name field with it. 
  2285.            
  2286.           For example, if you have a person in your database by the 
  2287.           name of Howard Johnston, the original key would be: 
  2288.           JohnstonHowa. If a second Howard Johnston were added, the 
  2289.           key might look like: Johnst24Howa.  
  2290.            
  2291.           While this could cause some alphabetizing problems, the 
  2292.           solution would be to have a key field wide enough to 
  2293.           accommodate any possibility. Since Paradox works best with 
  2294.           narrow tables, the routine was set for a maximum of 12 
  2295.           characters. This still allows for up to 100 people (00 
  2296.           through 99) with the same name. 
  2297.            
  2298.           The routine makes no provision for network use and can only 
  2299.           be called after the last name and first name fields have 
  2300.           been filled. Care should be taken to post the key as soon as 
  2301.           possible after the routine has been called to avoid 
  2302.           potential conflicts on a network. 
  2303.            
  2304.           Changes can easily be made in the source code in case the 
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.           last name and first name fields have different names.
  2318.  
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  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.           numbox 
  2384.            
  2385.            
  2386.           Description:  Puts a dialog box with headline on the screen 
  2387.           so the user can enter a number. 
  2388.            
  2389.           Syntax:   newnumber.n = numbox.n(headline.a) 
  2390.            
  2391.           Where: 
  2392.                newnumber.n . receives the number entered by the user 
  2393.                headline.a. . is the headline to put on the box 
  2394.            
  2395.            
  2396.           The routine puts a dialog box on the screen and allows the 
  2397.           user to enter a number. Space for a headline is provided to 
  2398.           prompt the user for what number to enter. The box is sized 
  2399.           to accommodate the length of the headline.
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.           numonly 
  2450.            
  2451.            
  2452.           Description:  Searches through a string and removes any 
  2453.           character that is not a number except a period. 
  2454.            
  2455.           Syntax:   newnumber.n = numonly.a(numberstring.a) 
  2456.            
  2457.           Where: 
  2458.                newnumber.n . receives a number as a string variable 
  2459.                numberstring.a. is a string 
  2460.            
  2461.            
  2462.           There are times when non-numerical data needs to be stripped 
  2463.           out so that a number can be placed either into a numeric 
  2464.           variable or a numeric field. 
  2465.            
  2466.           The numonly.a routine strips out all string values except 
  2467.           periods. A change in the source code can allow for the 
  2468.           stripping of periods also. 
  2469.            
  2470.           An example of this use might be to strip the dashes out of a 
  2471.           telephone number or social security number so the data can 
  2472.           be stored in a smaller numeric field. Of course the dashes 
  2473.           would have to be reinserted when the data is read, but the 
  2474.           savings in disk space may be worth the extra processor time 
  2475.           in doing so. 
  2476.            
  2477.           Note that the routine returns the data as a string. It can 
  2478.           easily be converted to a number with the PAL NUMVAL 
  2479.           function.
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.           popcal 
  2516.            
  2517.            
  2518.           Description:  A pop-up calendar program written entirely in 
  2519.           PAL. 
  2520.            
  2521.           Syntax:   popcal.u () 
  2522.            
  2523.            
  2524.           The routine puts a calendar showing the current month in the 
  2525.           upper right hand side of the screen. 
  2526.            
  2527.           The user may press the left and right arrow keys to move 
  2528.           forward or behind in months. The user presses the ESC key to 
  2529.           leave the routine. The system date must be accurately set 
  2530.           for the routine to work correctly. 
  2531.            
  2532.           The routine was intended to be called from a SETKEY command, 
  2533.           however it can just as easily be called from a program when 
  2534.           the user is asked to input a number.
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.           popval 
  2582.            
  2583.            
  2584.           Description:  A pop-up valcheck menu that allows the user to 
  2585.           select an appropriate valcheck for the current field. 
  2586.            
  2587.           Syntax:   popval.a () 
  2588.            
  2589.            
  2590.           The routine presents a menu of 22 possible valchecks and 
  2591.           sets the valcheck for the current field. 
  2592.            
  2593.           The user presses the arrow keys to move the light bar to the 
  2594.           appropriate valcheck, then presses ENTER to select it. 
  2595.            
  2596.           Once selected the routine sets that valcheck for the current 
  2597.           field. The user must be in edit mode for the routine to 
  2598.           work.
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.           remblank 
  2648.            
  2649.            
  2650.           Description:  Removes all spaces from a string. 
  2651.            
  2652.           Syntax:   newstring.a = remblanks.a(oldstring.a) 
  2653.            
  2654.           Where: 
  2655.                newstring.a . receives a string without blank spaces 
  2656.                oldstring.a . is a string that may contain blanks 
  2657.            
  2658.            
  2659.           Removes all ASCII 32 characters from a string.
  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.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.           restorerec 
  2714.            
  2715.            
  2716.           Description:  Restores last record deleted using the 
  2717.           delrec.u routine. 
  2718.            
  2719.           Syntax:   restorerec.u () 
  2720.            
  2721.            
  2722.           The most recent record deleted using the delrec.u routine is 
  2723.           held in an array in memory until the user leaves Paradox. 
  2724.            
  2725.           The restorerec.u routine will restore that record even if 
  2726.           the editing session has ended and the user is in main mode. 
  2727.           The table must be on the workspace at the time the 
  2728.           restoration is requested, but it may have been removed 
  2729.           previously. 
  2730.            
  2731.           The routine will work only for the most recent deletion.
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.           rtrim 
  2780.            
  2781.            
  2782.           Description:  Trims trailing spaces from a string. 
  2783.            
  2784.           Syntax:   newstring.a = rtrim.a (oldstring.a) 
  2785.            
  2786.           Where: 
  2787.                newstring.a . receives a string without trailing spaces 
  2788.                oldstring.a . is a string that may have trailing spaces 
  2789.            
  2790.            
  2791.           The routine will trim all trailing ASCII 32 characters from 
  2792.           a string. It will be faster than lrtrim.a if only trailing 
  2793.           are expected.
  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.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.           statusbar 
  2846.            
  2847.            
  2848.           Description:  A moving bar and message that graphically 
  2849.           shows the user how far a process has progressed. 
  2850.            
  2851.           Syntax:   statusbar.u(msg.a, row.n, col.n, length.n, 
  2852.           counter.n, start.n, end.n) 
  2853.            
  2854.           Where: 
  2855.                msg.a . . . . is the message to display above the bar 
  2856.                row.n . . . . is the row where the bar is to be displayed 
  2857.                col.n . . . . is the column where the bar is to begin 
  2858.                length.n. . . is the length of the bar 
  2859.                counter.n . . is the counter position in the loop 
  2860.                start.n . . . is the beginning of the loop 
  2861.                end.n . . . . is where the loop will end 
  2862.            
  2863.            
  2864.           Despite the number of variables required in a call to 
  2865.           statusbar, it is very easy to use. 
  2866.            
  2867.           The routine is intended to be used in a FOR/NEXT or 
  2868.           WHILE/ENDWHILE loop where the number of passes through the 
  2869.           loop are known. 
  2870.            
  2871.           Here is a sample of how statusbar.u might be used: 
  2872.            
  2873.                FOR x from 1 to 500 
  2874.             statusbar.u("Processing data", 5, 1, 20, x, 1, 500) 
  2875.             .... 
  2876.             .... 
  2877.             .... 
  2878.             ENDFOR 
  2879.            
  2880.           The routine will calculate the percentage of how far the 
  2881.           loop the counter gone, apply that percentage to the length 
  2882.           of the bar, then display the bar. With each pass through the 
  2883.           loop, the calculation is updated, allowing the use of the 
  2884.           STEP statement in the FOR loop. 
  2885.            
  2886.           While the routine will handle any length for the bar up to 
  2887.           one screen width.
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.           striphigh 
  2912.            
  2913.            
  2914.           Description:  Strips all ASCII characters above 126 out of a 
  2915.           string. 
  2916.            
  2917.           Syntax:   newstring.a = striphigh.a(oldstring.a) 
  2918.            
  2919.           Where: 
  2920.                newstring.a . receives ASCII characters below 127 
  2921.                oldstring.a . is a string 
  2922.            
  2923.            
  2924.           The routine will strip all high ASCII characters out of a 
  2925.           string that may cause problems with some printers.
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  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.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.           textbox 
  2978.            
  2979.            
  2980.           Description:  Prompts the user to enter a line of text and 
  2981.           formats it to all caps, all lower case or with only the 
  2982.           first letter of each word capitalized. 
  2983.            
  2984.           Syntax: newstring.a = textbox.a(headline.a, length.n, 
  2985.           styl.n) 
  2986.            
  2987.           Where: 
  2988.                newstring.a . receives a formatted string of text 
  2989.                headline.a. . is the headline to place on the box 
  2990.                length.n. . . is the number of characters to be entered 
  2991.                styl.n. . . . is the style to format the new text 
  2992.            
  2993.            
  2994.           Using a dialog box, textbox.a prompts the user for a one 
  2995.           line text string. A headline can be put on the box to prompt 
  2996.           the user as to what text to enter. The length.n variable 
  2997.           determines how long the string can be. 
  2998.            
  2999.           If styl.n is set to 1, the text will be returned to 
  3000.           newstring.a in all capitals. If it is set to 2, the string 
  3001.           will be returned in all lower case. If it is set to 3, the 
  3002.           first letter of each word will be capitalized. If any other 
  3003.           number is used, the text will be returned unaltered. 
  3004.            
  3005.           The routine also uses the lrtrim.a function to trim any 
  3006.           leading or trailing from the string. 
  3007.            
  3008.           If the user exits without entering any text, the routine 
  3009.           returns a value of false.
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.           waitkeypress 
  3044.            
  3045.            
  3046.           Description:  Creates a pause until the user presses a key. 
  3047.            
  3048.           Syntax:   waitkeypress.v () 
  3049.                 
  3050.                or 
  3051.            
  3052.                charpicked.a = waitkeypress.v () 
  3053.            
  3054.           Where: 
  3055.                charpicked.a.  is the key pressed 
  3056.            
  3057.            
  3058.           The routine is used to halt program execution until a key is 
  3059.           pressed. If knowing the key is important, the function 
  3060.           version of the routine can be used.
  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.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.           wipes 
  3110.            
  3111.            
  3112.           Description:  A demonstration program to show how wipes can 
  3113.           be added to a program. 
  3114.            
  3115.           Syntax:   wipes.u () 
  3116.            
  3117.            
  3118.           Wipes is included only to show that wipes can be done with 
  3119.           PAL. The source code shows how wipes can be written into 
  3120.           programs.^Z
  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.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.