home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / dl1b.zip / LIB1B.DOC < prev   
Text File  |  1987-02-24  |  42KB  |  2,839 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                               Dirk Lesko's Library
  27.  
  28.                   Autumn'86 Clipper Version: Expanded Library
  29.  
  30.                          Copyright (c) Dirk Lesko 1987
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.                                Special Thanks to: 
  86.  
  87.                                  Steven Steiner
  88.                              Tom Rettig Associates
  89.  
  90.  
  91.                  For their patience in helping me to understand
  92.                        the Clipper compiler extend system.
  93.  
  94.  
  95.                          And special thanks to my wife
  96.                   Mariel for her patience in understanding me.
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.                               DIRK LESKO'S LIBRARY 
  139.                               --------------------
  140.                                      Ver 1b.
  141.  
  142.  
  143.  
  144.         If you find Dirk Lesko's Library to be useful, and 
  145.         would like to see more Clipper library functions in the 
  146.         future, A small contribution to the author of these functions
  147.         would inspire more functions. The contribution can be any     
  148.         amount you wish, $10.00 is recommended but feel free to send
  149.         whatever you think is justifiable.
  150.       
  151.         Send all contributions and comments to:
  152.     
  153.         Dirk Lesko
  154.         C/O Dirk Lesko's Library
  155.         P.O. Box 3382
  156.         Jersey City, NJ  07303-3382
  157.  
  158.  
  159.         Dirk Lesko can also be contacted on the BOSS BBS in     
  160.         New Jersey at the following number: (201)568-7293
  161.         Dirk runs an exclusive Clipper conference where you can  
  162.         converse with the top Clipper experts in the country, as well
  163.         as pick up on Nantucket newsletters and bug lists. Your  
  164.         participation is welcome.    
  165.  
  166.         
  167.         The files included in Dirk Lesko's Library ver. 1b. are:
  168.  
  169.         dl1b.lib        - Dirk Lesko's Library version 1b.
  170.         dl1b.doc        - Documentation for Library version 1b.
  171.         checklib.prg    - Clipper program to check that all functions
  172.                           are included in the .LIB file.
  173.  
  174.  
  175.         To use any of the functions listed here, simply include the
  176.         function name as stated in this manual, and add the library 
  177.         file onto the end of your link command line.
  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.                             DISCLAIMER OF WARRANTIES
  210.                             ------------------------
  211.          
  212.  
  213.         Dirk Lesko distributes these functions solely on an "as is" 
  214.         basis and offers no warranties, period.
  215.  
  216.         Dirk Lesko shall not bear any liability or responsibility to
  217.         any user or entity with respect to any liability, loss or 
  218.         damage caused, or alleged to be caused directly, or indirectly
  219.         by the functions contained in this product, including but not
  220.         limited to interruption of services, loss of business or
  221.         anticipatory profits or consequential damages resulting from   
  222.         the use or operation of any of the functions contained in this
  223.         product.
  224.  
  225.         Dirk Lesko makes no warranties, either expressed or implied
  226.         regarding this software product, it's merchantibility and/or
  227.         it's fitness for a particular purpose. The user agrees that
  228.         Dirk Lesko shall not be held liable for any consequential
  229.         damages, even if Dirk Lesko has been advised of the possibility
  230.         of such damages.
  231.  
  232.         By using any of the functions contained in this library, you
  233.         acknowledge your agreement with all of the above conditions.
  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.                                    LICENSING
  276.                                    ---------
  277.  
  278.  
  279.         You may incorporate any of the functions into software
  280.         applications you develop, and you may distribute copies
  281.         of the programs to anyone you wish.
  282.  
  283.  
  284.         Feel free to make copies of the library, and to pass 
  285.         them along to other users of Clipper. so as to further
  286.         perpetuate the dBASE language, and the Clipper compiler.
  287.  
  288.  
  289.         No source code is provided, and none is available for
  290.         release onto the BBS sytems. You may upload and download 
  291.         copies of Dirk Lesko's Library onto any bulletin board   
  292.         you like, and you may distribute copies of Dirk Lesko's 
  293.         Library as long as no fee is charged, and all Copyright 
  294.         notices are left intact.
  295.  
  296.  
  297.  
  298.                                 TRADEMARK NOTICE
  299.                                 ----------------
  300.  
  301.         Clipper is a trademark of Nantucket Corporation
  302.         dBASE is a trademark Ashton-Tate
  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. Clipper 1a                        UNTRIM() FUNCTION
  334. ______________________________________________________________
  335.  
  336.         SYNTAX: mem_var = UNTRIM(<expC>,<expN>)
  337.  
  338.     PARAMETERS: <expC> character string
  339.                 <expN> amount of trailing spaces to add to <expC>
  340.                 
  341.        RETURNS: <expC> with spaces added to the end equal to <expN>
  342.                 
  343.        PURPOSE: Restore the length of a string after using the
  344.                 TRIM() function.
  345.                 
  346.          NOTES: if <expN> is less than the length of <expC>,
  347.                 <expC> remains unchanged. (Opposite of trim())
  348.  
  349.        EXAMPLE:
  350.                 m_var = space(20)
  351.                 @ 10,0 say "Enter text:" get m_var
  352.                 read
  353.                 m_var = trim(m_var)
  354.                 
  355.                 ** program lines using trimmed m_var
  356.                 
  357.                 m_var = UNTRIM(m_var,20) ** m_var length is restored to 20
  358.                                          ** without changing original contents
  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. Clipper 1a                         DTOW() FUNCTION
  400. ______________________________________________________________
  401.  
  402.         SYNTAX: mem_var = DTOW(<expD>)
  403.  
  404.     PARAMETERS: <expD> date variable
  405.  
  406.        RETURNS: Character string in the form Month, day, year
  407.  
  408.        PURPOSE: To print the date in standard letter format
  409.  
  410.          NOTES: none
  411.  
  412.        EXAMPLE: 
  413.                 m_date = DTOW(DATE())
  414.                 ? m_date
  415.                 
  416.                 ** if date = 12/25/87
  417.                 ** DTOW() returns: December 25, 1987
  418.  
  419.       SEE ALSO: LTOW()
  420.  
  421.  
  422.  
  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. Clipper 1a                        GETKEY() FUNCTION
  466. ______________________________________________________________
  467.  
  468.         SYNTAX: m_var = GETKEY()
  469.  
  470.     PARAMETERS: none
  471.  
  472.        RETURNS: uppercase ascii character of key pressed
  473.  
  474.        PURPOSE: to avoid using the UPPER() function 50 times in
  475.                 every program
  476.  
  477.          NOTES: does not return correct characters for function keys
  478.                 or ctrl/alt key combinations. Help can be invoked, as
  479.                 can SET KEY TO.
  480.  
  481.                 functionally equivalent to: 
  482.                 
  483.                 set console off
  484.                 wait "" to mem_var
  485.                 set console on
  486.                 mem_var = UPPER(mem_var)
  487.  
  488.        EXAMPLE:
  489.                 m_var = GETKEY()
  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. Clipper 1a                        CENTER() FUNCTION
  532. ______________________________________________________________
  533.  
  534.         SYNTAX: @ 10,CENTER(mem_var) say mem_var
  535.  
  536.     PARAMETERS: <expC> character string
  537.  
  538.        RETURNS: <expN> integer 
  539.  
  540.        PURPOSE: to center text on the screen with @ n,n say command
  541.  
  542.          NOTES: returns (80-LEN(mem_var))/2
  543.  
  544.        EXAMPLE:
  545.                 m_var = "Main Menu Selections"
  546.                 @ 1,CENTER(m_var) say m_var
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  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. Clipper 1a                         DIAL() FUNCTION
  598. ______________________________________________________________
  599.  
  600.         SYNTAX: DIAL(<expC>,<expC>,<expC>)
  601.  
  602.     PARAMETERS: <expC> Com port designation, com1 or com2
  603.                 <expC> Dialing command for modem          
  604.                 <expC> Telephone number to dial - can have (  )  - in number
  605.  
  606.  
  607.        RETURNS: <expC> character string of phone number dialed
  608.  
  609.        PURPOSE: To access a modem and dial a telephone number from
  610.                 a field in a database    
  611.  
  612.  
  613.          NOTES: You must use the DOS command MODE comX:baud,8,N,1 as stated
  614.                 in your DOS manual, you can put it in your autoexec.bat file.
  615.                 You can also include modem commands other than ATDT.
  616.  
  617.                 Dial will return a character string equal to the last
  618.                 parameter sent it. Useful for printing the phone number
  619.                 and dialing at the same time.
  620.  
  621.                 To disconnect the modem, send the command "ATZ" as the
  622.                 second parameter. examples are using the Hayes standard
  623.                 
  624.                 To dial long distance, use the modem command "AT DT 1"
  625.                 as the second parameter.
  626.  
  627.                 All examples assume a hayes compatible modem. If the number
  628.                 being called has the same area code as the telephone, don't
  629.                 dial the area code, all you will get is a busy signal.
  630.  
  631.        EXAMPLE:
  632.                 m_com   = "com1"              
  633.                 m_stat  = "ATDT" **for tone - use "ATDP" for pulse
  634.                 m_phone = "(212)142-5956"
  635.                  
  636.                 @ 10,0 say "Dialing :&m_phone" 
  637.                 DIAL(m_com,m_stat,m_phone)      
  638.  
  639.                 ** To disconnect the modem to switch to voice use
  640.                 
  641.                 @ 10,0 say "Modem disconnected." 
  642.                 DIAL(m_com,"ATZ","")
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662. --------------------------------------------------------------
  663.  Asm 1a                           SET_PAGE() FUNCTION
  664. ______________________________________________________________
  665.  
  666.         SYNTAX: SET_PAGE(<expN>) 
  667.  
  668.     PARAMETERS: <expN> integer page number
  669.  
  670.        RETURNS: nothing
  671.  
  672.        PURPOSE: to switch the monitor to another page
  673.  
  674.          NOTES: This service does not check for a valid page #  
  675.                 please refer to the DOS technical reference for 
  676.                 proper page #'s.                                
  677.  
  678.        EXAMPLE: 
  679.                 m_var = 2
  680.                 SET_PAGE(m_var)       
  681.  
  682.  
  683.  
  684.       SEE ALSO: GET_PAGE() 
  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. Asm 1a                             RESET() FUNCTION
  731. ______________________________________________________________
  732.  
  733.         SYNTAX: RESET(<expN)
  734.  
  735.     PARAMETERS: <expN> parallel  printer port number
  736.  
  737.        RETURNS: nothing
  738.  
  739.        PURPOSE: This procedure will reset the printer to it's
  740.                 power on state.
  741.  
  742.          NOTES: <expN> is optional, if left out, the default
  743.                 printer port is used.
  744.  
  745.        EXAMPLE: 
  746.                 RESET(1)
  747.                             && or &&
  748.                 RESET()
  749.  
  750.  
  751.       SEE ALSO: PRTSCR()
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  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. Asm 1a                             PRTSCR() FUNCTION
  796. ______________________________________________________________
  797.  
  798.         SYNTAX: PRTSCR()
  799.  
  800.     PARAMETERS: none
  801.  
  802.        RETURNS: nothing
  803.  
  804.        PURPOSE: to print a copy of the screen to the printer
  805.  
  806.          NOTES: none
  807.  
  808.        EXAMPLE: 
  809.                 m_var = " "
  810.                 @ 10,0 say "Press 'P' to print this screen"
  811.                 wait "" to m_var
  812.  
  813.                 if uppe(m_var)="P"
  814.                   PRTSCR()
  815.                 endi
  816.  
  817.       SEE ALSO: RESET()
  818.  
  819.  
  820.  
  821.  
  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. Asm 1a                            GET_MODE() FUNCTION
  862. ______________________________________________________________
  863.  
  864.         SYNTAX: mem_var = GET_MODE()
  865.  
  866.     PARAMETERS: none
  867.  
  868.        RETURNS: <expN> integer = to current video mode in use
  869.  
  870.        PURPOSE: to get the current video mode
  871.  
  872.          NOTES: Refer to the DOS technical manual for a description
  873.                 of the various modes.
  874.  
  875.        EXAMPLE: 
  876.                 mem_var = GET_MODE()
  877.                 ? str(mem_var,2)
  878.  
  879.       SEE ALSO: SET_MODE()
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  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. Asm 1a                            GET_PAGE() FUNCTION
  929. ______________________________________________________________
  930.  
  931.         SYNTAX: mem_var = GET_PAGE()
  932.  
  933.     PARAMETERS: none
  934.  
  935.        RETURNS: <expN> integer = to the current video page #
  936.  
  937.        PURPOSE: to find out what the current video page is
  938.  
  939.          NOTES: Refer to the DOS technical reference manual
  940.                 for information on video pages
  941.  
  942.        EXAMPLE: 
  943.                 m_var = GET_PAGE()
  944.                 ? str(m_var,1)
  945.  
  946.       SEE ALSO: SET_PAGE()  
  947.  
  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. Asm 1a                             CHDIR() FUNCTION
  994. ______________________________________________________________
  995.  
  996.         SYNTAX: if .not. CHDIR(<expC>)
  997.  
  998.     PARAMETERS: <expC> character string name of directory to change to
  999.  
  1000.        RETURNS: logical .T. if succesful
  1001.                 logical .F. if directory not found
  1002.  
  1003.        PURPOSE: To change the default directory without running
  1004.                 the DOS CHDIR command.
  1005.  
  1006.          NOTES: if unsuccessful some reasons could be:   
  1007.                 directory does not exist
  1008.                 directory name does not conform to DOS rules
  1009.                 Also, will return false if a CHDIR() is tried
  1010.                 without first trimming the <expC> parameter   
  1011.                 because spaces after the root name are not allowed.
  1012.  
  1013.        EXAMPLE: 
  1014.                 m_var = space(20)
  1015.                 @ 10,0 say "Change to what directory? " get m_var
  1016.                 read
  1017.  
  1018.                 if .not. chdir("&m_var")
  1019.                         ? "Couldn't find directory &m_var"
  1020.                 else
  1021.                         ? "Directory change succesfull:
  1022.                 endif
  1023.  
  1024.       SEE ALSO: MKDIR(), RMDIR(), CURR_DRIVE(), CURR_DIR(), SET_DRIVE(), 
  1025.                 ISDIR()
  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. Asm 1a                             MKDIR() FUNCTION
  1060. ______________________________________________________________
  1061.  
  1062.         SYNTAX: if .not. MKDIR(<expC>)
  1063.  
  1064.     PARAMETERS: <expC> character string name of directory to make
  1065.  
  1066.        RETURNS: logical .T. if successful
  1067.                 logical .F. if unable to create directory
  1068.  
  1069.        PURPOSE: to make a subdirectory without running the
  1070.                 DOS MKDIR command.
  1071.  
  1072.          NOTES: if unsuccessful, reasons could be:
  1073.                 the name does not conform to DOS standards
  1074.                 no more directory entries are allowed
  1075.                 disk full
  1076.                 directory already exists
  1077.                 
  1078.        EXAMPLE: 
  1079.                 m_var = space(20)
  1080.                 @ 10,0 say "Enter directory to make: " get m_var
  1081.                 read
  1082.  
  1083.                 if .not. MKDIR("&m_var")
  1084.                         ? "Could not create directory &m_var"
  1085.                 else
  1086.                         ? "Directory creation successful"
  1087.                 endif
  1088.  
  1089.  
  1090.       SEE ALSO: CHDIR(), RMDIR(), CURR_DRIVE(), CURR_DIR(), SET_DRIVE()
  1091.                 ISDIR()
  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. Asm 1a                             RMDIR() FUNCTION
  1127. ______________________________________________________________
  1128.  
  1129.         SYNTAX: if .not. RMDIR(<expC>) 
  1130.  
  1131.     PARAMETERS: <expC> character string of directory to remove
  1132.  
  1133.        RETURNS: logical .T. if successful
  1134.                 logical .F. if unsuccessful
  1135.  
  1136.        PURPOSE: to remove a directory without running the DOS RMDIR
  1137.                 command
  1138.                 
  1139.          NOTES: if unsuccessful some reasons could be:
  1140.                 directory does not exist
  1141.                 directory name does not conform to DOS rules
  1142.                 directory is not empty
  1143.  
  1144.  
  1145.        EXAMPLE:         
  1146.                 m_var = space(20)
  1147.                 @ 10,0 say "Remove what directory? " get m_var
  1148.                 read
  1149.  
  1150.                 if .not. RMDIR("&m_var")
  1151.                         ? "Could not remove directory &m_var"
  1152.                 else
  1153.                         ? "Directory &m_var removed"
  1154.                 endif
  1155.  
  1156.  
  1157.       SEE ALSO: MKDIR(), CHDIR(), CURR_DRIVE(), CURR_DIR(), SET_DRIVE()
  1158.                 ISDIR()
  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. Asm 1a                            SET_MODE() FUNCTION 
  1192. ______________________________________________________________
  1193.  
  1194.         SYNTAX: SET_MODE(<expN>)
  1195.  
  1196.     PARAMETERS: <expN> integer of mode to change to.
  1197.  
  1198.        RETURNS: nothing
  1199.  
  1200.        PURPOSE: to change video modes from Clipper    
  1201.  
  1202.          NOTES: does not check for valid video modes
  1203.  
  1204.        EXAMPLE:
  1205.                 m_var=2
  1206.                 SET_MODE(m_var)  
  1207.  
  1208.  
  1209.       SEE ALSO: GET_MODE()
  1210.  
  1211.  
  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. Asm 1a                            SYSMEM() FUNCTION
  1258. ______________________________________________________________
  1259.  
  1260.         SYNTAX: mem_var = SYSMEM()
  1261.  
  1262.     PARAMETERS: none
  1263.  
  1264.        RETURNS: <expN> integer of DOS's record of TOTAL SYSTEM memory
  1265.  
  1266.        PURPOSE: to find out how much memory DOS says is installed
  1267.  
  1268.          NOTES: none
  1269.  
  1270.        EXAMPLE:
  1271.                 m_var = SYSMEM()
  1272.                 ? str(m_var,3)
  1273.  
  1274.       SEE ALSO: OS()
  1275.  
  1276.  
  1277.  
  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. Asm 1a                             CURSOR() FUNCTION
  1324. ______________________________________________________________
  1325.  
  1326.         SYNTAX: CURSOR(<expN>,<expN>)
  1327.  
  1328.     PARAMETERS: <expN> integer for starting scan line
  1329.                 <expN> integer for ending scan line
  1330.  
  1331.        RETURNS: nothing
  1332.  
  1333.        PURPOSE: to change the size of the cursor from within Clipper
  1334.  
  1335.          NOTES: the CGA uses 0 - 7 as it's starting/ending scan lines
  1336.                 the EGA/MDA uses 0 - 13 as starting/ending scan lines
  1337.                 if the first <expN> parameter is 32 decimal, the
  1338.                 cursor will be turned off
  1339.  
  1340.        EXAMPLE:
  1341.  
  1342.                 if iscolor()
  1343.                   CURSOR(0,7)
  1344.                 else
  1345.                   CURSOR(0,13)
  1346.                 endi
  1347.  
  1348.  
  1349.       SEE ALSO: CSR_TOP(), CSR_BOT()
  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. Asm 1a                              CLS() FUNCTION
  1390. ______________________________________________________________
  1391.  
  1392.         SYNTAX: @ nn,nn say CLS()
  1393.  
  1394.     PARAMETERS: none
  1395.  
  1396.        RETURNS: nothing   
  1397.  
  1398.        PURPOSE: functionally equivalent to Clippers @ n,n clear
  1399.                 function, only much faster and cleaner
  1400.  
  1401.          NOTES: does not clear gets, and can be used to print a string
  1402.                 at location n,n.
  1403.  
  1404.        EXAMPLE:
  1405.                 @ 5,0 say CLS()
  1406.                 &&      or      &&
  1407.                 @ 5,0 say CLS() + "This was printed at cursor location 5,0"
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  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. Asm 1a                           CURR_DRIVE() FUNCTION
  1456. ______________________________________________________________
  1457.  
  1458.         SYNTAX: mem_var = CURR_DRIVE()
  1459.  
  1460.     PARAMETERS: none
  1461.  
  1462.        RETURNS: <expC> uppercase character string of the current 
  1463.                 drive letter
  1464.  
  1465.        PURPOSE: to find out the current default drive
  1466.  
  1467.          NOTES: none
  1468.  
  1469.        EXAMPLE:
  1470.                 m_var = CURR_DRIVE()
  1471.                 ? "Current default drive is &m_var.:"
  1472.  
  1473.       SEE ALSO: MKDIR(), CHDIR(), RMDIR(), CURR_DIR(), SET_DRIVE()
  1474.                 ISDIR()
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  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. Asm 1a                            SET_TIME FUNCTION()
  1522. ______________________________________________________________
  1523.  
  1524.         SYNTAX: SET_TIME(<expC>)
  1525.  
  1526.     PARAMETERS: <expC> character string in the form HH:MM:SS
  1527.  
  1528.        RETURNS: nothing
  1529.  
  1530.        PURPOSE: to set the computers internal system clock
  1531.                 without running the DOS TIME command.
  1532.  
  1533.          NOTES: a valid time string is not checked for
  1534.                 unpredictable results can occur if times are
  1535.                 outside those allowable. ie: "25:79:00
  1536.                 also, 24 hour format has to be used
  1537.  
  1538.  
  1539.        EXAMPLE: 
  1540.                 m_var = space(8)
  1541.                 @ 10,0 say "Enter time: " get m_var pict "99:99:99"
  1542.                 read
  1543.  
  1544.                 SET_TIME("&m_var")
  1545.  
  1546.  
  1547.       SEE ALSO: SET_DATE()
  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. Asm 1a                            SET_DATE() FUNCTION 
  1588. ______________________________________________________________
  1589.  
  1590.         SYNTAX: SET_DATE(<expC>)
  1591.  
  1592.     PARAMETERS: <expC> character string in the form MM/DD/YY
  1593.  
  1594.        RETURNS: nothing
  1595.  
  1596.        PURPOSE: to set the computers internal system date
  1597.                 without running the DOS DATE command
  1598.  
  1599.          NOTES: does not check for valid dates. If an invalid date
  1600.                 is used, unpredictable results could occur.
  1601.                 also, all years are presumed to be for the 20th century.
  1602.                 ie: MM/DD/01 will translate to the year 1901
  1603.  
  1604.  
  1605.        EXAMPLE:
  1606.                 m_var = space(8)
  1607.                 @ 10,0 say "Enter new date: " get m_var pict "99/99/99"
  1608.                 read
  1609.  
  1610.                 SET_DATE("&m_var")
  1611.  
  1612.  
  1613.       SEE ALSO: SET_TIME()
  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. Asm 1a                            SET_DRIVE() FUNCTION
  1654. ______________________________________________________________
  1655.  
  1656.         SYNTAX: SET_DRIVE(<expC>)
  1657.  
  1658.     PARAMETERS: <expC> character letter of drive to set
  1659.  
  1660.        RETURNS: nothing
  1661.  
  1662.        PURPOSE: to change the default drive
  1663.  
  1664.          NOTES: uses the first character of the string passed
  1665.                 as the drive to set, also does not check to
  1666.                 see if the drive actually exists.
  1667.  
  1668.        EXAMPLE:
  1669.                 m_var = " "
  1670.                 @ 10,0 say "Enter default drive: " get m_var pict "!"
  1671.                 read
  1672.  
  1673.                 SET_DRIVE("&m_var")
  1674.  
  1675.  
  1676.       SEE ALSO: MKDIR(), CHDIR(), RMDIR(), CURR_DIR(), CURR_DRIVE()
  1677.                 ISDIR()
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  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. Clipper 1a                        SUBSET() FUNCTION
  1720. ______________________________________________________________
  1721.  
  1722.         SYNTAX: if SUBSET(<expC>,<expC>)
  1723.  
  1724.     PARAMETERS: <expC> character string or memory variable
  1725.                 <expC> character string or memory variable
  1726.  
  1727.        RETURNS: Logical .T. if all characters in first string
  1728.                 appear in the second string regardless of order,
  1729.                 otherwise, returns logical .F.
  1730.  
  1731.        PURPOSE: to see if all the characters in the first parameter
  1732.                 exist in the second parameter, in any order.
  1733.  
  1734.          NOTES: Looks for an EXACT match.
  1735.  
  1736.        EXAMPLE:
  1737.                 m_test = "AaBbCcDdEeFfGgHhIi"
  1738.                 m_var  = "     "
  1739.                 @ 10,0 say "Enter a string : " get m_var
  1740.                 read
  1741.  
  1742.                 if subset(m_var,m_test)
  1743.                         ? "All characters were found....."
  1744.                 else 
  1745.                         ? "All characters were not found....."
  1746.                 endif
  1747.                 
  1748.       SEE ALSO: SUBSETS()
  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. Asm 1a                            ISUPPER() FUNCTION
  1786. ______________________________________________________________
  1787.  
  1788.         SYNTAX: if ISUPPER(<expC>)
  1789.  
  1790.     PARAMETERS: <expC> character string or memory variable
  1791.  
  1792.        RETURNS: Logical .T. if the first character of the string
  1793.                 is uppercase, otherwise, returns .F.
  1794.  
  1795.        PURPOSE: To see if the first character of a string is uppercase
  1796.  
  1797.          NOTES: Returns false if any other character besides a valid
  1798.                 alpha character is the first character in the string.
  1799.  
  1800.        EXAMPLE: 
  1801.                 m_var = space(20)
  1802.                 @ 10,0 say "Enter a string : " get m_var
  1803.                 read
  1804.  
  1805.                 if .not. isupper(m_var)
  1806.                         ? "The first character is not uppercase"
  1807.                 else
  1808.                         ? "The first character is in uppercase"
  1809.                 endif
  1810.  
  1811.       SEE ALSO: ISLOWER()
  1812.  
  1813.  
  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. Asm 1a                            ISLOWER() FUNCTION  
  1852. ______________________________________________________________
  1853.  
  1854.         SYNTAX: if ISLOWER(<expC>)
  1855.  
  1856.     PARAMETERS: <expC> character string or memory variable
  1857.  
  1858.        RETURNS: Logical .T. if the first character of the string
  1859.                 is lowercase, otherwise, returns .F.
  1860.  
  1861.        PURPOSE: To see if the first character of a string is lowercase
  1862.  
  1863.          NOTES: Returns false if any other character besides a valid
  1864.                 alpha character is the first character in the string.
  1865.  
  1866.        EXAMPLE: 
  1867.                 m_var = space(20)
  1868.                 @ 10,0 say "Enter a string : " get m_var
  1869.                 read
  1870.  
  1871.                 if .not. islower(m_var)
  1872.                         ? "The first character is not lowercase"
  1873.                 else
  1874.                         ? "The first character is in lowercase"
  1875.                 endif
  1876.  
  1877.       SEE ALSO: ISUPPER()
  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. Asm 1a                             LTOW() FUNCTION
  1918. ______________________________________________________________
  1919.  
  1920.         SYNTAX: Print LTOW(<expL>
  1921.  
  1922.     PARAMETERS: <expL> Logical type memory variable
  1923.  
  1924.        RETURNS: A character string of "True" if <expL> is logical
  1925.                 .T., otherwise returns a string of "False".
  1926.  
  1927.        PURPOSE: To print the results of a logical variable
  1928.  
  1929.          NOTES: none
  1930.  
  1931.        EXAMPLE: 
  1932.                 m_var = space(20)
  1933.                 @ 10,0 say "Enter a string : " get m_var
  1934.                 read
  1935.  
  1936.                 Print "The uppercase test was "+LTOW(ISUPPER(m_var))
  1937.  
  1938.       SEE ALSO: none
  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. Asm 1a                              OS() FUNCTION
  1984. ______________________________________________________________
  1985.  
  1986.         SYNTAX: Print OS()
  1987.  
  1988.     PARAMETERS: none
  1989.  
  1990.        RETURNS: character string of the DOS version number
  1991.  
  1992.        PURPOSE: to find out under which version of DOS we're running
  1993.  
  1994.          NOTES: only works with 2.XX or higher
  1995.  
  1996.        EXAMPLE: 
  1997.                 @ 10,0 say "You are using DOS version "+OS()
  1998.  
  1999.  
  2000.       SEE ALSO: SYSMEM()
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  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. Clipper                        SUBSETS() FUNCTION 
  2051. ______________________________________________________________
  2052.  
  2053.         SYNTAX: m_var = SUBSETS(<expC>,<expC>)
  2054.  
  2055.     PARAMETERS: <expC> character string or memory variable
  2056.                 <expC> character string or memory variable
  2057.  
  2058.        RETURNS: A character string of all characters in the first 
  2059.                 string that appear in the second string regardless 
  2060.                 of order, otherwise, returns a null string 
  2061.  
  2062.        PURPOSE: to see which characters in the first parameter
  2063.                 exist in the second parameter, in any order.
  2064.  
  2065.          NOTES: Looks for an EXACT match.
  2066.  
  2067.        EXAMPLE:
  2068.                 m_test = "AaBbCcDdEeFfGgHhIi"
  2069.                 m_var  = "     "
  2070.                 @ 10,0 say "Enter a string : " get m_var
  2071.                 read
  2072.  
  2073.                 m_var2 = subsets(m_var,m_test)
  2074.                 ? "The characters &m_var2 were accepted....."
  2075.  
  2076.                 
  2077.       SEE ALSO: SUBSET()
  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. Asm 1a                           ALLALPHA() FUNCTION
  2116. ______________________________________________________________
  2117.  
  2118.         SYNTAX: if allalpha()
  2119.  
  2120.     PARAMETERS: <expc> character string or memory variable
  2121.  
  2122.        RETURNS: logical .T. if all characters in the string are
  2123.                 printable alpha characters, .F. if not.
  2124.  
  2125.        PURPOSE: to be sure that all characters in the string can
  2126.                 be printed by any printer with standard ascii codes.
  2127.  
  2128.          NOTES: Alpha characters will be considered as : A-Z, a-z, 0-9
  2129.                 !"#$%&'()*+,-./:;<=>?@[\]^_`}|{~ and space. Also,
  2130.                 returns .F. if no string, or the wrong type variable or      
  2131.                 a null string is passed.
  2132.  
  2133.        EXAMPLE: 
  2134.                 mem_var = space(20)
  2135.                 @ 10,0 say "Enter a string:" get mem_var
  2136.                 read
  2137.  
  2138.                 if .not. allalpha(mem_var)
  2139.                     ? "&mem_var contains a character that can't be printed"
  2140.                 else
  2141.                     ? "All characters can be printed"
  2142.                 endif
  2143.  
  2144.       SEE ALSO: ALLASCII(), ALLNUM()
  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. Asm 1a                           ALLASCII() FUNCTION
  2182. ______________________________________________________________
  2183.  
  2184.         SYNTAX: if allascii()
  2185.  
  2186.     PARAMETERS: <expc> character string or memory variable
  2187.  
  2188.        RETURNS: logical .T. if all characters in the string are
  2189.                 standard ascii characters, .F. if not.
  2190.  
  2191.        PURPOSE: to be sure that characters in the string do not
  2192.                 contain any extended graphics characters.            
  2193.  
  2194.          NOTES: Ascii characters are those characters with decimal    
  2195.                 values between 0 and 127. Also returns .F. if no 
  2196.                 string, the wrong type variable is passed, or a null 
  2197.                 string is passed. And, if a null character (0) is 
  2198.                 encountered, it will be treated as the end of the string.
  2199.  
  2200.        EXAMPLE: 
  2201.                 mem_var = space(20)
  2202.                 @ 10,0 say "Enter a string:" get mem_var
  2203.                 read
  2204.  
  2205.                 if .not. allascii(mem_var)
  2206.                     ? "Extended graphics characters are not permitted"     
  2207.                 else
  2208.                     ? "All characters are within the ascii range"
  2209.                 endif
  2210.  
  2211.       SEE ALSO: ALLALPHA(), ALLNUM()
  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. Asm 1a                            ALLNUM() FUNCTION
  2248. ______________________________________________________________
  2249.  
  2250.         SYNTAX: if allnum()
  2251.  
  2252.     PARAMETERS: <expc> character string or memory variable
  2253.  
  2254.        RETURNS: logical .T. if all characters in the string are
  2255.                 numbers, .F. if not.
  2256.  
  2257.        PURPOSE: to be sure that the character string contains
  2258.                 only numbers.            
  2259.  
  2260.          NOTES: returns .F. if a null or empty string is passed. Also      
  2261.                 returns .F. if no string, or the wrong type variable is      
  2262.                 is passed.
  2263.  
  2264.        EXAMPLE: 
  2265.                 mem_var = space(20)
  2266.                 @ 10,0 say "Enter a string of numbers:" get mem_var
  2267.                 read
  2268.  
  2269.                 if .not. allnum(mem_var)
  2270.                     ? "You can only enter numbers into the string"         
  2271.                 else
  2272.                     ? "The character string contains only numbers"
  2273.                 endif
  2274.  
  2275.       SEE ALSO: ALLALPHA(), ALLASCII()
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312. --------------------------------------------------------------
  2313. Asm 1a                              FRE() FUNCTION
  2314. ______________________________________________________________
  2315.  
  2316.         SYNTAX: mem_var = FRE()
  2317.  
  2318.     PARAMETERS: none
  2319.  
  2320.        RETURNS: <expN> amount of available memory
  2321.  
  2322.        PURPOSE: to see if there is enough memory to run a
  2323.                 program before it is run.
  2324.  
  2325.          NOTES: none
  2326.  
  2327.        EXAMPLE:
  2328.                 if FRE() < 64000
  2329.                         ? "Not enough memory to run program......"
  2330.                 else
  2331.                         RUN <program>
  2332.                 endif
  2333.  
  2334.       SEE ALSO: SYSMEM()
  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. Asm 1a                            CURR_DIR() FUNCTION
  2379. ______________________________________________________________
  2380.  
  2381.         SYNTAX: mem_var = CURR_DIR(<expC>)
  2382.  
  2383.     PARAMETERS: <expC> character string or memory variable of 
  2384.                 Drive to check.
  2385.  
  2386.        RETURNS: current directory of the drive specified in
  2387.                 <expC>, or if no parameter is specified, the
  2388.                 directory of the default drive.
  2389.  
  2390.        PURPOSE: To find the current paths of specified drives.
  2391.  
  2392.          NOTES: if no parameter is given, the default drive is
  2393.                 used, and if an invalid drive is specified, a null
  2394.                 string is returned. Errors will also return a null.
  2395.  
  2396.        EXAMPLE:
  2397.                 m_var = CURR_DIR()
  2398.  
  2399.                 ? "The default Directory is: "+m_var
  2400.  
  2401.       SEE ALSO: MKDIR(), CHDIR(), RMDIR(), CURR_DRIVE(), SET_DRIVE()
  2402.                 ISDIR()
  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. Asm 1a                             TIMEH() FUNCTION
  2446. ______________________________________________________________
  2447.  
  2448.         SYNTAX: mem_var = timeh()
  2449.  
  2450.     PARAMETERS: none
  2451.  
  2452.        RETURNS: time string in the format HH:MM:SS:SS
  2453.                 the last two digits are hundreths of a second.
  2454.  
  2455.        PURPOSE: to time as accurately as possible procedures, and to
  2456.                 conduct time tests.
  2457.  
  2458.          NOTES: none
  2459.  
  2460.        EXAMPLE: 
  2461.                 ? timeh()
  2462.                 ? "The time it took to print this is the difference"
  2463.                 ? "between the two time strings."
  2464.                 ? timeh()
  2465.  
  2466.       SEE ALSO: SET_TIME(), SET_DATE()
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  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. Asm 1a                             ISDIR() FUNCTION
  2512. ______________________________________________________________
  2513.  
  2514.         SYNTAX: if isdir(<expC>)
  2515.  
  2516.     PARAMETERS: <expC> character string or memory variable
  2517.  
  2518.        RETURNS: logical .T. if directory exists, otherwise .F.
  2519.  
  2520.        PURPOSE: To see if a particular directory is present
  2521.  
  2522.          NOTES: if unsuccessful some reasons could be:   
  2523.                 directory does not exist
  2524.                 directory name does not conform to DOS rules
  2525.                 Also, will return false if a CHDIR() is tried
  2526.                 without first trimming the <expC> parameter   
  2527.                 because spaces after the root name are not allowed.
  2528.  
  2529.        EXAMPLE:
  2530.                 if .not. isdir("B:\progs")
  2531.                         ? "Can't find the program directory....."
  2532.                 else
  2533.                         ! b:\progs\myprogram
  2534.                 endi
  2535.  
  2536.       SEE ALSO: MKDIR(), CHDIR(), RMDIR(), CURR_DRIVE(), SET_DRIVE()
  2537.                 CURR_DIR()
  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. Asm 1c                          DL_VERSION() FUNCTION
  2578. ______________________________________________________________
  2579.  
  2580.         SYNTAX: @ 10,0 say DL_VERSION()
  2581.  
  2582.     PARAMETERS: none
  2583.  
  2584.        RETURNS: <expC> Library name and version number
  2585.  
  2586.        PURPOSE: to find out what version of Dirk Lesko's Library
  2587.                 you are presently using.
  2588.  
  2589.          NOTES: none
  2590.  
  2591.        EXAMPLE: 
  2592.                 ? DL_VERSION()
  2593.  
  2594.       SEE ALSO: none
  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.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642. --------------------------------------------------------------
  2643. Asm 1c                            CSR_TOP() FUNCTION
  2644. ______________________________________________________________
  2645.  
  2646.         SYNTAX: mem_var = CSR_TOP()
  2647.  
  2648.     PARAMETERS: none
  2649.  
  2650.        RETURNS: <expN> integer of the cursors starting scan line
  2651.  
  2652.        PURPOSE: to store the starting scan line before we
  2653.                 shut the sursor off
  2654.  
  2655.          NOTES: the CGA uses 0 - 7 as it's starting/ending scan lines
  2656.                 the EGA/MDA uses 0 - 13 as starting/ending scan lines
  2657.                 if the <expN> parameter is 32 decimal, the
  2658.                 cursor has been turned off
  2659.  
  2660.        EXAMPLE: 
  2661.                 store 0 to m_top,m_bot
  2662.  
  2663.                 m_top = csr_top()
  2664.                 m_bot = csr_bot()
  2665.  
  2666.                 CURSOR(32,32)                   &&turn cursor off
  2667.  
  2668.                 && do program with cursor off
  2669.  
  2670.                 CURSOR(m_top,m_bot)             &&turn cursor on again
  2671.  
  2672.  
  2673.       SEE ALSO: CURSOR(), CSR_BOT()
  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. Asm 1c                            CSR_BOT() FUNCTION
  2710. ______________________________________________________________
  2711.  
  2712.         SYNTAX: mem_var = CSR_BOT()
  2713.  
  2714.     PARAMETERS: none
  2715.  
  2716.        RETURNS: <expN> integer of the cursors ending scan line
  2717.  
  2718.        PURPOSE: to store the ending scan line before we
  2719.                 shut the sursor off
  2720.  
  2721.          NOTES: the CGA uses 0 - 7 as it's starting/ending scan lines
  2722.                 the EGA/MDA uses 0 - 13 as starting/ending scan lines.
  2723.                 only values 0 - 13 have any effect on the cursor when
  2724.                 used as the ending scan line.
  2725.  
  2726.        EXAMPLE: 
  2727.                 store 0 to m_top,m_bot
  2728.  
  2729.                 m_top = csr_top()
  2730.                 m_bot = csr_bot()
  2731.  
  2732.                 CURSOR(32,32)                   &&turn cursor off
  2733.  
  2734.                 && do program with cursor off
  2735.  
  2736.                 CURSOR(m_top,m_bot)             &&turn cursor on again
  2737.  
  2738.       SEE ALSO: CURSOR(), CSR_TOP()
  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. Asm 1c                            ISPRINT() FUNCTION
  2776. ______________________________________________________________
  2777.  
  2778.         SYNTAX: if isprint(<expN>)
  2779.  
  2780.     PARAMETERS: <expN> parallel printer port # to check
  2781.  
  2782.        RETURNS: logical .T. if printer is online and is ready,
  2783.                 otherwise returns .F.
  2784.  
  2785.        PURPOSE: to see if the printer is ready before we print
  2786.                 to it so as to avoid the (A)bort (R)etry message.
  2787.  
  2788.          NOTES: if no paramater is given, LPT1 is used
  2789.  
  2790.        EXAMPLE:
  2791.                 if .not. isprint(1)
  2792.                         ? "Printer not ready, Please correct....."
  2793.                 else
  2794.                         set print on
  2795.                         ? "Report # 2546, dated.........."
  2796.                 endif
  2797.  
  2798.       SEE ALSO: RESET(), PRTSCR()
  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.