home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / qb / basdx172.lzh / BASDX172.DOC next >
Encoding:
Text File  |  1988-03-03  |  88.8 KB  |  2,480 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                    BASIC Deluxe Version 1.72 (FINAL) February 1988        1
  8.  
  9.  
  10.  
  11.              A Library of routines written in Assembly language for use
  12.                 with the Microsoft QuickBASIC and IBM BASIC compilers
  13.  
  14.           BASIC Deluxe
  15.  
  16.           To  use    BASDLX  you  will  need,  either  the IBM BASIC or the
  17.           Microsoft QuickBASIC  compiler  and  PC-DOS/MS-DOS  version 2.0+.
  18.           These  routines  have  been  tested  with  the IBM BASIC compiler
  19.           version  2.0  and  QuickBASIC  version  3.0  and  have  caused no
  20.           problems. However,  the author is not responsible for any damages
  21.           caused by  but, not  limited to,   the  use, misuse,   non-use or
  22.           inability to  use BASDLX.  These routines are intended to be used
  23.           in compiled BASIC only.  Do not  confuse compiled  BASIC with the
  24.           BASIC interpreter, BASIC.COM or BASICA.COM that comes with DOS or
  25.           GWBASIC. The routines provided in this library have been designed
  26.           to run  faster than  any correspondent  BASIC code,  take up less
  27.           space, increase the capabilities  of compiled  BASIC and simplify
  28.           your programs.
  29.  
  30.           Distribution
  31.  
  32.           BASIC Deluxe  may be  freely distributed  to others  via any form
  33.           available, either electronic, magnetic, mechanical, optical, etc.
  34.           as long as no  fee or special consideration is charged and all of
  35.           the  related  files  to  BASDLX  are  included  together  in  the
  36.           unmodified  form.  With  one  exception:  If it is distributed by
  37.           profit or non-profit "software libraries", it can charge  no more
  38.           than the  cost of  the diskette  and shipping, all of which shall
  39.           not exceed $10. It  would be  a great  courtesy if  all "software
  40.           libraries"  that  distribute  BASDLX  would  notify the author in
  41.           writing of such intent. SOURCE CODE MAY NOT BE DISTRIBUTED.
  42.  
  43.           Copyright
  44.  
  45.           BASIC Deluxe is protected  by  the  U.S.  copyright  law  and its
  46.           foreign provisions.  If you  use BASDLX  in your programs you are
  47.           required to obtain a license (which is not  expensive). An object
  48.           code license costs only $40. While a source & object code license
  49.           will cost only $60. Once you have purchased and signed  a license
  50.           agreement for  BASDLX, you  have full permission to use BASDLX in
  51.           commercial and/or private contexts. Licensees will receive a disk
  52.           containing  the  Object  and/or  Source  code (depending on which
  53.           license you purchase). Plus a  LASER  printed  and  plastic bound
  54.           documentation. All  corporations either private or public, profit
  55.           or non-profit MUST obtain a license regardless.
  56.            
  57.  
  58.  
  59.  
  60.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  61.  
  62.  
  63.  
  64.  
  65.  
  66.           2        BASIC Deluxe Version 1.72 (FINAL) February 1988
  67.  
  68.           BASIC Deluxe is going commercial
  69.  
  70.           You may have noticed  the  version  header  saying  "Version 1.72
  71.           (FINAL)".  This  is  the  last  release of BASIC Deluxe under the
  72.           ShareWare concept. I,  together  with  other  partners  have been
  73.           working  hard  to  create  a  new  and  more comprehensive set of
  74.           routines for BASIC  Deluxe.  Thus,  making  BASIC  Deluxe  a full
  75.           featured competitive library worthy of commercial markets.
  76.  
  77.           The  commercial   version  of   BASIC  Deluxe,   aside  from  its
  78.           competitive low price, will include many more routines  to handle
  79.           trivial and non-trivial tasks. (All written in Assembly: fast and
  80.           compact.)
  81.  
  82.           Some of the features will include:
  83.  
  84.                Menu routines similar to QuickBASIC and Lotus.
  85.  
  86.                A filer or list, routine that allows the user to see, point,
  87.                and select or tag an item or items from the list of choices.
  88.                FILER produces a  display  similar  to  the  file  window in
  89.                QuickBASIC.
  90.  
  91.                A  complete  DOS  interface  routine that allows you to have
  92.                complete control over DOS. 
  93.  
  94.                A version of GETSTRD  but  for  multi-gets  that  allows you
  95.                design an  entire screen  full of fields and let mgets worry
  96.                about movement from field to field (the movement may be done
  97.                both dynamically and fixed, instead of just fixed like other
  98.                software (dBASE, Clipper) so, down really moves down and not
  99.                the next field in the order.)
  100.  
  101.                BASIC  Deluxe  will  also  feature  a  full set of windowing
  102.                routines to manage all windowing trivials.
  103.  
  104.           All input enhancement routines  will support  the mouse  and will
  105.           automatically call the KEYSTATS routine to update the key toggles
  106.           prompt (if active.) This will make the key  status `live'  and up
  107.           to   date   making   your   programs   feel,   look   and  behave
  108.           professionally.
  109.  
  110.           There are so many features that BASIC Deluxe will offer that this
  111.           short summary  could not possibly do it justice. Please feel free
  112.           to write and inquire for a complete brochure on BASIC Deluxe.
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  120.  
  121.  
  122.  
  123.  
  124.  
  125.                    BASIC Deluxe Version 1.72 (FINAL) February 1988        3
  126.  
  127.           Limited Special Offer
  128.  
  129.           Everyone who purchases a  license  to  BASIC  Deluxe  version 1.7
  130.           before  March   31st,  1988   will  receive  an  exclusive,  non-
  131.           transferrable $15 rebate coupon valid towards the purchase of the
  132.           commercial version  of BASIC Deluxe ( Scheduled to be released by
  133.           mid-1988 ). Limit one per customer.  Not valid  (rebate) with any
  134.           other offers. Void where prohibited by law.
  135.  
  136.           If you  like BASDLX  now, you  will love the new one even better,
  137.           guaranteed or your money back!
  138.  
  139.           Delay of the Commercial Version of BASIC Deluxe
  140.  
  141.           Due to a number  of new  ideas, latest  compiler versions,  and a
  142.           busy schedule  the commercial version of the BASIC Deluxe library
  143.           will  not  be  available  until  mid-1988.  Thank  you  for  your
  144.           patience. I have extended the rebate offer until the end of March
  145.           of 1988.
  146.  
  147.           Trademarks and Registered Trademarks
  148.  
  149.           Microsoft  &  MS-DOS  are  registered  trademarks   of  Microsoft
  150.           Corporation.  IBM,   XT,  AT   are  a  registered  trademarks  of
  151.           International  Business   Machines   Corporation.   dBASE   is  a
  152.           registered trademark  of Ashton  Tate. Clipper  is a trademark of
  153.           Nantucket Corporation. Lotus 1-2-3  is a  registered Trademark of
  154.           Lotus Development Corporation.
  155.  
  156.           BASIC Deluxe is a trademark of Gustavo H. Verdun
  157.  
  158.           What you get when you purchase your license for BASIC Deluxe
  159.  
  160.                o    A LASER printed documentation.
  161.                o    $15  Rebate  coupon  valid  towards the purchase of the
  162.                     commercial version.
  163.                o    Complete Object Code to build your own libraries.
  164.                     (  And  Source  Code  if  you  purchase  a  Source Code
  165.                     License.)
  166.                o    A  Library   utility  to   simplify  the  creation  and
  167.                     management of your user libraries.
  168.                o    Telephone support.
  169.  
  170.           Birthday!
  171.  
  172.           No, It's not BASIC  Deluxe's Birthday  (not until  November 11th)
  173.           but, it  is my birthday and I just turned 20. So: "Happy Birthday
  174.           to ME!"  The age is no lie, honest! (  I'm enjoying  my young age
  175.           while I can because it's not going to last for ever. )
  176.  
  177.  
  178.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  179.  
  180.  
  181.  
  182.  
  183.  
  184.           4        BASIC Deluxe Version 1.72 (FINAL) February 1988
  185.  
  186.           A Serious Reminder
  187.  
  188.           For those  of you who use BASIC Deluxe and have not yet purchased
  189.           a license, shame on  you.  For  those  who  have,  God  bless and
  190.           encourage others  to do  the same. I urge you to act according to
  191.           the rules. If you use BASIC  Deluxe, please  pay for  it. If not,
  192.           give it  to someone  who will.  I'm not concerned as much for the
  193.           computer hobbyists as I  am for  the computer  professionals that
  194.           use BASIC  Deluxe.   Professionals, please  make  yourselves look
  195.           good and respectable. We  are all  in this  business together, so
  196.           please help  make it  work! I have every confidence in all of you
  197.           and I trust that  you understand  and abide  by the  concept that
  198.           brings BASIC  Deluxe to  you! If  you use it you must support it!
  199.           Thank you, in advance, for your cooperation.
  200.  
  201.                       Using BASDLX with the IBM BASIC Compiler
  202.           These routines have been incorporated into a library to make them
  203.           easily accessible by the LINK.EXE program.  All you have to do is
  204.           copy BASDLX.LIB to the directory  or  disk  where  you  keep your
  205.           library files.   When  you link  your  programs that use routines
  206.           from BASDLX,  be sure to specify: BASDLX when the  linker prompts
  207.           you for a Library [.LIB] file(s). Please refer to your DOS manual
  208.           for more information on the LINK.EXE program.
  209.  
  210.                  Using BASDLX with the Microsoft QuickBASIC Compiler
  211.           The BASIC  Deluxe library  can be  used with  QuickBASIC by using
  212.           BASDLX.EXE library  file. Please read your QuickBASIC user manual
  213.           for more information on User Libraries. (QB Page 133)
  214.  
  215.           Note: If you need to get a copy of the object code then, send  $5
  216.           and I'll  mail you  a disk with the object code to BASDLX version
  217.           1.7. Please keep in mind that this is provided only  to allow you
  218.           to  further  review  the  BASDLX  library. If you later decide to
  219.           purchase a license, your $5 will be credited towards it.
  220.  
  221.                            Attention QuickBASIC 3.0 Users
  222.           If you need to create a stand alone program using QuickBASIC with
  223.           the  compile  to  BCOM30  option,  do  not  use  the  programming
  224.           environment; It has a  bug in  it! Use  the compile  from command
  225.           line  option  instead.  See  page  71  of  any QB manual for more
  226.           information about QB compile options.
  227.                               QB program_name /O;
  228.           the ";" is a must. It instructs the  compiler to  use the command
  229.           line processor instead of the development environment.
  230.  
  231.                           For those who have QuickBASIC 4.0
  232.           I have  received my  update of  QB to  4.0 from  Microsoft and am
  233.           currently updating the routines in  to  work  in  the development
  234.           environment. I will release them soon.
  235.  
  236.  
  237.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  238.  
  239.  
  240.  
  241.  
  242.  
  243.                    BASIC Deluxe Version 1.72 (FINAL) February 1988        5
  244.  
  245.                                     Special Notes
  246.  
  247.           The routines  provided in  this library  are available  to you by
  248.           using the CALL command from compiled BASIC. All numeric variables
  249.           passed  as  arguments  to  the routines must defined as integers.
  250.           This means that you can either globally set all numeric variables
  251.           to integers by issuing the DEFINT A-Z command at the beginning of
  252.           your program or, you can declare a single variable as  integer by
  253.           adding a "%" symbol at the end of its name. (i.e. I%)
  254.  
  255.           The variable  names used in the examples don't have to be exactly
  256.           the same. You may choose  other  names  that  would  be  more ap-
  257.           propriate. Keep in mind that the variable types do have to be the
  258.           same in the argument list (i.e. strings must be strings, integers
  259.           must be integers).
  260.  
  261.           Special Conventions
  262.  
  263.           You  may  find  in  the  argument  list  some  arguments that are
  264.           enclosed in []'s. This is used to indicate that the value for the
  265.           argument can  be safely entered directly instead of requiring you
  266.           to set it  to    variable.  For  example:  CALL  GUN(10)  or CALL
  267.           GUN(5+5):  are  both  perfectly  legal  ways  to  `call'  the GUN
  268.           routine; Either form will "fire" the gun 10 times. Not all of the
  269.           variables  in  BASDLX  may  be  entered in this way because BASIC
  270.           stores the value in a  temporary  location  and  immediately upon
  271.           return BASIC  destroys them,  and BASDLX  sometimes returns vital
  272.           information in that variable.
  273.  
  274.           Any Problems?
  275.  
  276.           These routines have been thoroughly tested and appear  to be free
  277.           of all bugs. However, if you happen to find any I'll be more than
  278.           happy to  fix them.  Be sure  to check  that you  are CALLing the
  279.           routines  properly.  That  is  that  you  are sending the correct
  280.           arguments to the routine.  One  of  the  most  common  error that
  281.           occurs  is  when  the  calling  program  sends to  the routine an
  282.           incorrect variable type. Remember that numeric  variables must be
  283.           declared integer.
  284.            
  285.           Please refer  any questions,  comments, requests for new routines
  286.           or License purchases to the following address: 
  287.  
  288.                                  Gustavo  H. Verdun
  289.                                      BASDLX V1.7
  290.                                  6424 Hollins Drive
  291.                                  Bethesda, MD 20817
  292.  
  293.  
  294.  
  295.  
  296.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  297.  
  298.  
  299.  
  300.  
  301.  
  302.           6        BASIC Deluxe Version 1.72 (FINAL) February 1988
  303.  
  304.           Routine Name   :    ALLDIRS
  305.           Arguments      :    (  Dir.Array$([start%]),  Maxdirs%, [Drive$],
  306.                               Ercd% )
  307.           Type           :    DOS/System
  308.           Purpose        :    Searches and  returns   all  of the available
  309.                               directory paths of the specified drive  in an
  310.                               array.
  311.           Description    :
  312.  
  313.           Dir.Array$([Start%]),  This  is  where  the directory names found
  314.           will be saved. Each element in this ONE dimensional array must be
  315.           set to  some length.  ALLDIRS is not very picky about the minimum
  316.           length but if it ever finds a directory path that will not fit in
  317.           the space provided it will stop and return with an `out of string
  318.           space condition'. DOS limits the maximum length of  any directory
  319.           path to  64 characters  including the  drive specifier (i.e. C:),
  320.           slashes and string terminator (ASCII 0)  So, you  will never need
  321.           more than a string length of 64 characters per element.
  322.  
  323.           Maxdirs%,   tells    ALLDIRS   the    number   of   elements   in
  324.           Dir.Array$([Start%]).  If  ALLDIRS  finds  more  directories than
  325.           space is  provided then  ALLDIRS stops and returns with a `Out of
  326.           string space condition'. Upon return from  ALLDIRS, Maxdirs%= the
  327.           number of directories found.
  328.  
  329.           [Drive$], Specifies  the drive  to search. The first character in
  330.           this string must specify the drive  letter all  other characters,
  331.           if any,  are ignored.  (ALLDIRS will NOT convert the drive letter
  332.           to upper case,  you  may  have  to  do  it  separately  if  it is
  333.           important.)
  334.  
  335.           Ercd%, 0  then everything  is fine.  An error  code of -1 = Drive
  336.           selected is not valid. -2 = Out of String space.
  337.  
  338.           Example:
  339.           DIM dir.array$(50)
  340.           FOR i=0 TO 50 : dir$(i)=SPACE$(64) : NEXT
  341.           d$="C:" : ercd%=0 : max%=51
  342.           CALL AllDirs(dir.array$(0),max%,d$,ercd%)
  343.           IF ercd% THEN PRINT "Error :";ercd%
  344.           PRINT "Directories found:"
  345.           FOR i = 0 TO max% : PRINT dir$(i) : NEXT
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  356.  
  357.  
  358.  
  359.  
  360.  
  361.                    BASIC Deluxe Version 1.72 (FINAL) February 1988        7
  362.  
  363.           Routine Name   :    ALLDRIVES
  364.           Arguments      :    ( Number_of_drives% )
  365.           Type           :    DOS/System
  366.           Purpose        :    Returns  the total  number  of logical drives
  367.                               (Diskette, Fixed, Ram, Etc.) Available.
  368.           Description    :
  369.  
  370.           This routine  will return  a minimum  of 2 Drives, since any com-
  371.           puter is assumed to have the logical drives A: & B: Even if there
  372.           is only one physical drive.
  373.  
  374.           Example:
  375.  
  376.           drvs%=0 : CALL AllDrives(drives%)
  377.           PRINT "You have ";drives%;" drives available."
  378.  
  379.  
  380.           Routine Name   :    ALLFILES
  381.           Arguments      :    (        [Search$],        [File_attribute%],
  382.                               Dir$([Start%]), Max_elements%, Error_code% )
  383.           Type           :    DOS/System
  384.           Purpose        :    Scans drive  and returns the  specified files
  385.                               in a string array.
  386.           Description    :
  387.  
  388.           Search$ specifies  the search  pattern. if  Search$ = "" then the
  389.           default "*.*" pattern is  used (without  the quotes).  The search
  390.           pattern may contain a drive letter, path, filename and extension.
  391.           The * and ? wild cards are accepted. The Search$ must end with an
  392.           ASCII 0 character. 
  393.  
  394.           File_attribute%  specifies  the  attribute  of  the  files  to be
  395.           searched for. See: "File Attributes" at the end  of this documen-
  396.           tation for a detailed explanation.
  397.  
  398.           Dir$([Strt%]) is  a one-dimentional  array that  will contain the
  399.           new directory. The [Strt%] parameter is the element  number where
  400.           the first  entry will  be stored.  All subsequent entries will be
  401.           entered in the following  elements of  the array.  Make sure that
  402.           every element in the string array is of a minimum length of 12. 
  403.  
  404.           Max_elements%, is used to tell the ALLFILES the size of the array
  405.           in elements. Upon return from ALLFILES this variable will contain
  406.           the number of files found.
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  415.  
  416.  
  417.  
  418.  
  419.  
  420.           8        BASIC Deluxe Version 1.72 (FINAL) February 1988
  421.  
  422.           Routine Name   :    ALLFILES (Continued)
  423.  
  424.           Ercd% is  used to  return an  error, if  any. If  Ercd%=0 then no
  425.           errors have occurred. (Note: A files not found status is recorded
  426.           by Max_elements% = 0.)
  427.  
  428.           -1   Bad DOS Version
  429.           -2   Out of  string space  (Either the elements in dir$() are not
  430.                set to  the  minimum  string  length  of  12  or  not enough
  431.                elements.)
  432.  
  433.           Example   :
  434.  
  435.           OPTION BASE 0
  436.           DIM dir$(100)
  437.           search$="" : attr%=0 : files%=101 ' since option base 1
  438.           CALL AllFiles(search$,attr%,dir$(0),files%,ercd%)
  439.           IF ercd% THEN PRINT "Directory size exceeded program limits":END
  440.           FOR i% = 0 TO files%-1 : PRINT dir$(i%) : NEXT
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  474.  
  475.  
  476.  
  477.  
  478.  
  479.                    BASIC Deluxe Version 1.72 (FINAL) February 1988        9
  480.  
  481.           Routine Name   :    BOX (Argument Order Change. Please Note)
  482.           Arguments      :    (  [Height%],  [Width%],  [FRAME$], [Color%],
  483.                               [Mode%] )
  484.           Type           :    Screen/Video
  485.           Purpose        :    Draws a box using the supplied arguments.
  486.           Description    :
  487.  
  488.           ( Author's Note: the arguments order ( [Height%], [Width%] ) were
  489.           reversed to  maintain a similarity to the Row, Column format that
  490.           BASIC uses. Since height refers to the number of rows...)
  491.  
  492.           [Height%], [Width%] : All dimensions are internal.
  493.  
  494.           BOX uses the current cursor  location  as  the  top  right corner
  495.           (frame) of the box.
  496.  
  497.           [FRAME$]  Specifies  the  frame  characters.  It  uses the format
  498.           similar to GRID's without all the `T's and `+'.
  499.  
  500.           Character Position            Description
  501.           ----------------------------------------------------------------
  502.                Top lines
  503.                     1                   Top left corner
  504.                     2                   Top horizontal
  505.                     3                   Top right corner
  506.  
  507.                Middle lines
  508.                     4                   Left vertical
  509.                     5                   BOX fill character
  510.                     6                   Right vertical
  511.  
  512.                Bottom line
  513.                     7                   Bottom left corner
  514.                     8                   Bottom horizontal
  515.                     9                   Bottom right corner
  516.           -----------------------------------------------------------------
  517.           [Color%], here, you may specify the color attribute that BOX will
  518.           use.  The  formula  for  the  color value is as follows: Color% =
  519.           (BACKGROUND and 7) * 16 + FOREGROUND
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  533.  
  534.  
  535.  
  536.  
  537.  
  538.           10       BASIC Deluxe Version 1.72 (FINAL) February 1988
  539.  
  540.           Routine Name   :    BOX (continued)
  541.  
  542.           [Mode%]:
  543.  
  544.             0       No Grow, `Boxes' pop on screen.
  545.             1       Grow from center out.
  546.             2       Grow from top right to bottom left
  547.             3       Grow from top left to bottom right.
  548.             4       Grow from bottom Left to top right.
  549.             5       Grow from bottom Right to top left.
  550.             6       Grow from top to bottom.
  551.             7       Grow from bottom to top.
  552.             8       Grow from left to right.
  553.             9       Grow from right to left.
  554.  
  555.           Example:
  556.  
  557.           LOCATE 1,1
  558.           CALL Box (78,23,FRAME$,7,1)
  559.           'rem this will draw a box around the entire screen.
  560.  
  561.  
  562.           Routine Name   :    BSORTN (Improved this Version)
  563.           Arguments      :    (   Num_of_elements,   Integer_array%(start),
  564.                               [Order%] )
  565.           Type           :    integer array service
  566.           Purpose        :    Sorts  an  integer  array  in ascending order
  567.                               with negative numbers  appearing  at  the end
  568.                               in ascending order. 
  569.           Description    :
  570.  
  571.           Integer variables  in BASIC  can contain  numbers between -32,768
  572.           and 32,767. This routine does not distinguish between negative or
  573.           positive numbers.  It will  sort the  elements in ascending order
  574.           with all the negative numbers (if  existing) appearing  after the
  575.           positive numbers  in ascending order. Make sure that the array is
  576.           of type integer. Unpredictable results may occur if not!
  577.  
  578.           [Order%], if 0 will  specify descending  order, any  other number
  579.           will produce ascending order.
  580.  
  581.           Example:
  582.           DIM a%(300) : PRINT "Array Before sort:"
  583.           FOR i% = 0 TO 300 : a%(i%) = INT(RND(1)*30000)
  584.           PRINT a%(i%), : NEXT
  585.           enum%=301 : CALL BsortN(enum%,a%(0),1)
  586.           ' enum%=301  because there  are 301 elements in the array (0-300)
  587.           PRINT "Array After sort:"
  588.           FOR i% = 0 TO 300 : PRINT a%(i%), : NEXT
  589.           ' the list should be sorted in ascending numerical order!
  590.  
  591.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  592.  
  593.  
  594.  
  595.  
  596.  
  597.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       11
  598.  
  599.           Routine Name   :    BSORTS (Improved this version)
  600.           Arguments      :    (    [Number_of_elements%],   Array$(start%),
  601.                               [Order%] )
  602.           Type           :    String array service
  603.           Purpose        :    Sorts a  string array in ascending/descending
  604.                               alphabetical order.
  605.           Description    :
  606.  
  607.           The first argument should contain the number of  elements to sort
  608.           in the array. The second argument is the array itself. be sure to
  609.           specify the starting position  in  the  array  [i.e.  CALL BSORTS
  610.           (elements%, a$(0)),1) 
  611.  
  612.           IMPORTANT:  All  of  the  elements  in  the array MUST have equal
  613.           lengths, if not, unpredictable results will occur to BASIC.
  614.  
  615.           [Order%], if 0 it will be  in descending  alphabetical order. Any
  616.           other value will sort in ascending order.
  617.  
  618.           Example:
  619.           DIM a$(10)
  620.           a$(0)="First" : a$(1)="Second" : a$(2)="Third"   : a$(3)="Fourth"
  621.           a$(4)="Fifth" : a$(5)="Sixth"  : a$(6)="Seventh" : a$(7)="Eighth"
  622.           a$(8)="Ninth" : a$(9)="Tenth"
  623.           FOR i%=0 TO 9 : b$=SPACE$(10) : CALL setl(a$(i%),b$)
  624.           a$(i%)=b$ : NEXT
  625.           ' the above line will make all of the elements in the array
  626.           ' have equal lengths.
  627.           PRINT "Array before sort:"
  628.           FOR i%=0 TO 9 : PRINT a$(i%) : NEXT
  629.           enum%=10 : CALL bsorts(enum%,a$(0),1)
  630.           '  enum%=10  because  there  are  10  elements in the array (0-9)
  631.           PRINT "Array After sort:"
  632.           FOR i%=0 TO 9 : PRINT a$(i%) : NEXT
  633.           ' the list should be sorted in ascending alphabetical order!
  634.  
  635.  
  636.           Routine Name   :    CASESTR
  637.           Arguments      :    (string_var$,[case_val%])
  638.           Type           :    String service
  639.           Purpose        :    Converts string to defined case.
  640.           Description    :
  641.  
  642.           case_val%, 0 = Convert string to lower case. 1 = Convert string
  643.           to upper case,  2 = Swap case (All upper case characters
  644.           will be converted to lower case and vice-versa.)
  645.  
  646.           Example:
  647.           a$="this will be in caps":case%=1:call case(a$,case%)
  648.           print a$
  649.  
  650.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  651.  
  652.  
  653.  
  654.  
  655.  
  656.           12       BASIC Deluxe Version 1.72 (FINAL) February 1988
  657.  
  658.           Routine Name   :    CASERANGE
  659.           Arguments      :    ( String$, [Start%], [Length%], [Case%] )
  660.           Type           :    String service
  661.           Purpose        :    Converts a portion  of  a  string  to defined
  662.                               case.
  663.           Description    :
  664.  
  665.           case_val%, is  the parameter  that specifies what case to convert
  666.           to. 
  667.  
  668.                0    Convert string to lower case. 
  669.                1    Convert string to upper case,  
  670.                2    Swap case (All upper case characters  will be converted
  671.                     to lower case and vice-versa.)
  672.  
  673.           Example:
  674.           a$="the word `caps' will be in upper case :caps"
  675.           casev%=1:call case(a$,40,4,casev1%):print a$
  676.  
  677.  
  678.           Routine Name   :    CNFKEYS
  679.           Arguments      :    (  [Row%],  [Column%],  [String$], [Scolor%],
  680.                               [Ifillchar%], [Bcolor%], [KeyCode%] )
  681.           Type           :    Configuration for KEYSTATS
  682.           Purpose        :    Change default settings  for  each individual
  683.                               toggle key.
  684.           Description    :
  685.  
  686.           [Row%], [Column%]  specify the  location where to write and clear
  687.           the toggle key. If [Row%] is -1 then the routine will disable the
  688.           trapping  of  this  key  (i.e.  It may show others when called by
  689.           KEYSTATS but not this one.)
  690.  
  691.           [String$], [Scolor%] specify the text  to  display  when  the key
  692.           toggle is  active and the color to write it in. If you place a -1
  693.           for the [String$] argument, it  will  leave  the  current defined
  694.           string untouched.
  695.  
  696.           [Ifillchar%],  [Icolor%]  specify  the  ASCII  code  for the fill
  697.           character used to clear the section  of the  screen when  the key
  698.           toggle is inactive and the color for this write.
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  710.  
  711.  
  712.  
  713.  
  714.  
  715.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       13
  716.  
  717.           Routine Name   :    CNFKEYS (Continued)
  718.  
  719.           [KeyCode%] specifies the key to which the above information apply
  720.           to.
  721.  
  722.           [KeyCode%]     key       Default: text  Color     Row,Col
  723.           -----------------------------------------------------------------
  724.                1         Insert    " INSERT "     7         1,1
  725.                2         Caps      " CAPS "       7         1,9
  726.                3         Numbers   " NUM "        7         1,15
  727.                4         Scroll    " SCROLL "     7         1,20
  728.           -----------------------------------------------------------------
  729.           All of the keys have the default [IFillChar%] of ASCII 32 (space)
  730.           and [Icolor%] of 7.
  731.  
  732.           Example:
  733.  
  734.           CALL CnfKeys( 1,40,"<Insert>",7,32,7,1) ' change insert
  735.           CALL CnfKeys(-1,0,"",0,0,0,2)      ' disable Caps
  736.           CALL CnfKeys(-1,0,"",0,0,0,3)      ' disable Number
  737.           CALL CnfKeys(-1,0,"",0,0,0,4)      ' disable Scroll
  738.  
  739.  
  740.           Routine Name   :    CNFGSD (Improved this Version)
  741.           Arguments      :    ([overwrite%],  [insert%],  [frame%], [tab%],
  742.                               [Delimiters$])
  743.           Type           :    Configuration for GETSTRD
  744.           Purpose        :    Change default settings for GETSTRD.
  745.           Description    :
  746.  
  747.           [Overwrite%] & [Insert%], (Default is  full  &  half  size cursor
  748.           respectively) These two arguments contain the cursor shapes  that
  749.           indicate if overwrite or insert  is active.  The formula  for the
  750.           values that must be stored in these two arguments is as follows: 
  751.           =(START and  31)*256+STOP   Where START & STOP are the values for
  752.           cursor start & stop scan lines which must be in  the range  of 0-
  753.           31. (See  the BASIC LOCATE command for more information on cursor
  754.           shapes.) NOTE:  a value  of zero  for these  options leaves their
  755.           current defaults in effect.
  756.  
  757.           [Frame%],  (Default  ASCII  95)  This argument contains the ASCII
  758.           code for the frame character. GETSTRD draws a one line frame of 
  759.           the length of String$ to let you see the field  size. A  value of
  760.           zero for this option leaves its current default in effect.
  761.  
  762.           [Tab%], (Default  1) Number  of spaces to insert for a [TAB] key.
  763.           Valid number is in the range of 0-10. A value above 10 leaves the
  764.           current default unchanged.
  765.  
  766.  
  767.  
  768.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  769.  
  770.  
  771.  
  772.  
  773.  
  774.           14       BASIC Deluxe Version 1.72 (FINAL) February 1988
  775.  
  776.           Routine Name   :    CNFGSD (Continued)
  777.  
  778.           [Delimiters%] is a two character string that specify the left and
  779.           right delimiter characters. The  default is  "[]" if  you enter a
  780.           null  string  (i.e.  ""  )  here,  will  leave  current  defaults
  781.           unchanged. These  delimiters  will  be  displayed  only  when you
  782.           activate them via the GETSTRD mode argument. (2)
  783.  
  784.           Example:
  785.           oc%=(0 and 31)*256+7:ic%=(5 and 31)*256+7 
  786.           'this is here to show the values of the default cursors.
  787.           ic%=0: oc%=0 : frame%=177 : tab%=0
  788.           call cnfgsd(ic%, oc%, frame%, tab%,"::")
  789.  
  790.           -In this example: Insert & overwrite cursor values are unchanged.
  791.           Frame character is set to ASCII  177.  [TAB]  key  will  insert 0
  792.           spaces in  string (disables [TAB] key). NOTE: If ASCII 32 (space)
  793.           is not a valid  key  in  GETSTRD  then  [TAB]  does  nothing. The
  794.           delimiters have been changed to two colons.
  795.  
  796.  
  797.           Routine Name   :    DATESTR
  798.           Arguments      :    ( String$, Length%, [Mode%] )
  799.           Type           :    Date support
  800.           Purpose        :    Reads    the    date and writes string_space$
  801.                               with  the  date  in   the  following  format:
  802.                               week-day  month  day,  year.  (i.e. Thursday,
  803.                               March 12, 1987)
  804.           Description    :
  805.  
  806.           The first argument,  String_space$,  must  be  of    at  least 30
  807.           characters of length. If Length% returns with a zero then there 
  808.           wasn't enough space in the string variable String_space$. The 
  809.           Mode% argument tells the routine to either write the full name of
  810.           the week-day and month or just the first three letters of 
  811.           each. If Mode%=0, or any number other than one, then the full
  812.           names of the week-day and month will be written. If  Mode%=1 then
  813.           only the first three characters of the week-day and month will be
  814.  
  815.           written. The Length% argument is used to tell BASIC the true and 
  816.           final length of String_space$ (This way you easily get rid of the
  817.           trailing characters after the year since, the actual length of 
  818.           String_space$ will vary greatly depending on the date.)
  819.           NOTE: String_space$  will never  be any longer than 30 characters
  820.           of length.
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  828.  
  829.  
  830.  
  831.  
  832.  
  833.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       15
  834.  
  835.           Routine Name   :    DATESTR (Continued)
  836.  
  837.           Example:
  838.           D$=space$(30):l%=0:mode%=0:call datestr(d$,l%,mode%)
  839.           if l%=0 then print "Not enough space in D$!":stop
  840.           d$=left(d$,l%):print "Today is ";d$ 
  841.           D$=space$(30):l%=0:mode%=1:call datestr(d$,l%,mode%)
  842.           if l%=0 then print "Not enough space in D$!":stop
  843.           d$=left(d$,l%):print "Today is ";d$
  844.  
  845.  
  846.           Routine Name   :    DLXMOUSE 
  847.           Arguments      :    ( Buttons% )
  848.           Type           :    Mouse support
  849.           Purpose        :    Resets  mouse  and  returns   the  number  of
  850.                               buttons.
  851.           Description    :
  852.  
  853.           This routine performs three tasks. First, it checks to see if the
  854.           mouse is installed by  attempting to  reset it.  If mouse  is not
  855.           available then  buttons% =  0 otherwise it will return the number
  856.           of available buttons. Second, depending if mouse is available, it
  857.           sets an internal `switch' used, internally, by BASDLX routines to
  858.           tell if mouse should be supported. Third, if  you set  buttons% =
  859.           -1 before  calling the  routine it  will automatically `lock-out'
  860.           the use of the mouse by any routine in BASDLX.  (one may override
  861.           a forced  lock-out or  force a  mouse reset  from the keyboard by
  862.           pressing the [Ctrl]-[Backspace] keys  together while  inside of a
  863.           BASDLX routine that supports a mouse.
  864.  
  865.           Example:
  866.           call dlxmouse(b%)
  867.           print "You have ";b%;"mouse buttons available."
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  887.  
  888.  
  889.  
  890.  
  891.  
  892.           16       BASIC Deluxe Version 1.72 (FINAL) February 1988
  893.  
  894.           Routine Name   :    GETKSTATS
  895.           Arguments      :    ( Toggle%, Status% )
  896.           Type           :    Keyboard
  897.           Purpose        :    Checks the toggle key and returns its status.
  898.           Description    :
  899.  
  900.           Toggle% is the a value from 1 to 4 which refers to the toggle key
  901.           code. (SEE KEYSTATS for the Toggle% code)
  902.  
  903.           Status%, returned by  GETKSTATS  if  0  then  the  toggle  key is
  904.           inactive. -1 if active.
  905.  
  906.           Example:
  907.  
  908.           CALL GetKstats( 1, Insert% )
  909.           IF Insert% THEN PRINT "Insert is active."
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  946.  
  947.  
  948.  
  949.  
  950.  
  951.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       17
  952.  
  953.           Routine Name   :    GETSTRD (Radically Improved in this Version)
  954.           Arguments      :    (   String$,   Length%,  Picture$,  Pointer%,
  955.                               Color%, Mode% )
  956.           Type           :    String/Data entry enhancement
  957.           Purpose        :    This  routine accepts input from the keyboard
  958.                               and  stores  it  in  the    String$  argument
  959.                               allowing   the   use   of   standard  editing
  960.                               commands.
  961.           Description    :
  962.  
  963.           ( Author's  Note: To  say `Improved'  would be an understatement.
  964.           This FINAL revision of the GETSTRD  routine closes  the evolution
  965.           process that  I wished  for it.  I always intended for GETSTRD to
  966.           offer what it now does: The input validation of GETSTRD  has been
  967.           radically changed. You can now give GETSTRD a complete PICTURE of
  968.           what you want to be entered and how it should  look! And  it even
  969.           handles numbers like a pro! )
  970.  
  971.           String$, This  is the  space where the input data will be stored.
  972.           The field size of the input  data will  be set  to the  length of
  973.           this string.  If there is already some data in the string it will
  974.           not be  erased. Just  be sure  to set  the Length%  to the proper
  975.           value  to  let  GETSTRD  know  that  there is already data in the
  976.           String$  variable  that  is  ready  to  be  edited.  Due  to  the
  977.           limitations  that   BASIC  imposes   on  assembly  language  with
  978.           variables, the String$ variable must be filled in  to the maximum
  979.           size of the field.
  980.  
  981.           Length%, If  you have  a string  length that  is shorter than the
  982.           field size that you have allocated for the data, GETSTRD  will be
  983.           able to  know and  upon return  tell you the actual length of the
  984.           string. This makes it easy to remove the trailing spaces in the 
  985.           String$ if they  are  not  important.  A  Length%  of  zero tells
  986.           GETSTRD that  it is  a `fresh'  data field containing no previous
  987.           input.
  988.  
  989.           Picture$, This string defines the picture  of the  field you wish
  990.           to  input.  BEFORE  CALLING  GETSTRD  YOU  *MUST* FIRST PASS THIS
  991.           STRING THROUGH THE MAKEPICTURE ROUTINE. MAKEPICTURE WILL COMPRESS
  992.           THE  Picture$  AND  TURN  ALL  THE  FUNCTIONS  YOU  DEFINED TO AN
  993.           INTERNAL CODING METHOD. A sample Picture$  could be  : "@K (999)-
  994.           999-9999" This  is what  a Picture$  would look  like to define a
  995.           field  for  entering  a  telephone  number.  Please  SEE SECTION:
  996.           "Defining Data  Field Pictures"  at the end of this documentation
  997.           for details on functions and template symbols. A Picture$ may not
  998.           be of null length.  However, the following is valid :  Picture$ =
  999.           " ". There must always be at least a space in the  Picture$. This
  1000.           definition  will  define  `X'  as the valid characters allowed in
  1001.           each position of the field. (If  the @N  (i.e. Picture$  = "@N ")
  1002.           Function is used then the default template is `9'.)
  1003.  
  1004.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.           18       BASIC Deluxe Version 1.72 (FINAL) February 1988
  1011.  
  1012.           Routine Name   :    GETSTRD (Continued)
  1013.  
  1014.           [Pointer%],  On  entry,  the  value  of this argument will be the
  1015.           active offset from which the cursor will be placed. To  place the
  1016.           cursor at  the end  of the  string then,  set this value to zero.
  1017.           Upon exit this argument will contain the last  position offset of
  1018.           the cursor. 1 = the first character in the string.
  1019.  
  1020.           Color%, here,  you may  specify the  color attribute that GETSTRD
  1021.           will use. The formula for the color value is as follows:
  1022.           Color%=(BACKGROUND and 7)*16+FOREGROUND 
  1023.  
  1024.           Mode%, This and the  Color%  arguments  are  used  by  GETSTRD to
  1025.           define  and  return  codes  to  and  from  the routine. The Mode%
  1026.           argument is a bit  based value,  in other  words each  bit in the
  1027.           value  represents   a  special   function.  The  following  table
  1028.           identifies the each function code and its corresponding function.
  1029.  
  1030.               Code                             Function
  1031.           -----------------------------------------------------------------
  1032.                1                   Exit on extended  key.  This  will force
  1033.                                    and exit if any non-editing key is hit.
  1034.                2                   Use Delimiters.
  1035.                4                   Quit.  GETSTRD  will  display everything
  1036.                                    and exit.
  1037.                8                   Mouse Exit. This will exit if  the mouse
  1038.                                    was  clicked  over  an  area outside the
  1039.                                    input field.
  1040.           -----------------------------------------------------------------
  1041.           How Mode% works
  1042.  
  1043.           A value of zero would result  in GETSTRD  to ignore  all extended
  1044.           keys, not use delimiters and, ignore the mouse if clicked outside
  1045.           the field. If you wanted the program to  use delimiters  and exit
  1046.           on extended  keys the  proper mode% would be : 1 + 2 = 3. It's as
  1047.           simple as adding the  codes  together.  (Just  like  you  add the
  1048.           status  bits  for  each  type of file attribute characteristic in
  1049.           DOS.)
  1050.  
  1051.           Mode% upon return from GETSTRD
  1052.  
  1053.                Mode%                              Significance
  1054.           -----------------------------------------------------------------
  1055.                0                   Normal. User pressed Return.
  1056.  
  1057.                -1                  That a normal exit key has been pressed.
  1058.                                    The  ASCII  code  of  this  key  will be
  1059.                                    returned  in  Color%  (i.e.  [ESC] would
  1060.                                    look like Mode% = -1 and Color% = 27 )
  1061.  
  1062.  
  1063.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       19
  1070.  
  1071.           Routine Name   :    GETSTRD (Continued)
  1072.  
  1073.                -2                  An extended  exit key  has been pressed.
  1074.                                    The extended code  is  in  Color%. (i.e.
  1075.                                    [PgUp] would  look like:  Mode% = -2 and
  1076.                                    Color$ = 73 ) 
  1077.  
  1078.                -3                  GETSTRD  has  encountered  and  error it
  1079.                                    cannot continue.  Color% will return the
  1080.                                    error code value:
  1081.  
  1082.                                    1         Not Text  mode  GETSTRD cannot
  1083.                                              work in a graphics mode.
  1084.                                    2         The length of String$ is zero.
  1085.                                              GETSTRD has  no  room  to work
  1086.                                              with.
  1087.                                    3         Picture      function      not
  1088.                                              supported.
  1089.  
  1090.                non-zero            GETSTRD  is  returning  due  to  a mouse
  1091.                                    exit. Mode% = Column and Color% = Row of
  1092.                                    where button was clicked. (You will have
  1093.                                    to  call  MBUTTONM  to get the status of
  1094.                                    the button and which one it is.)
  1095.           -----------------------------------------------------------------
  1096.           The following Editing keys are supported:
  1097.  
  1098.           [LEFT-ARROW]             Move cursor one space left.
  1099.           [RIGHT-ARROW]            Move cursor one space right.
  1100.           [HOME]                   Move cursor to beginning of line.
  1101.           [END]                    Move cursor to the end of field.
  1102.  
  1103.           ( NOTE: The end of the field is determined by  the current length
  1104.           of the input data and not the maximum length of the data field. )
  1105.  
  1106.           [CTRL]-[RIGHT-ARROW]     Move cursor one word right.
  1107.           [CTRL]-[LEFT-ARROW]      Move cursor one word left.
  1108.           [CTRL]-[HOME]            Erase entire input field.
  1109.           [CTRL]-[END]             Erase from cursor position to the end of
  1110.                                    the line.
  1111.           [CTRL]-[BACKSPACE]       Forces a mouse reset.
  1112.  
  1113.           (  SEE  ALSO  DLXMOUSE  AND  MOUSE  NOTES  at  the  end  off this
  1114.           documentation. )
  1115.  
  1116.           [INS]                    Set/Clear Insert mode.
  1117.           [DEL]                    Deletes character at cursor position.
  1118.           [BACKSPACE]              Deletes character to the left of cursor.
  1119.           [TAB]                    Inserts x spaces. (See also CNFGSD)
  1120.  
  1121.  
  1122.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.           20       BASIC Deluxe Version 1.72 (FINAL) February 1988
  1129.  
  1130.           Routine Name   :    GETSTRD (Continued)
  1131.  
  1132.           GETSTRD supports the mouse as a pointing device. Press ANY of the
  1133.           mouse buttons and if the mouse  is over  a valid  location in the
  1134.           field, the  cursor will  be moved  to it. The mouse cursor is now
  1135.           constantly visible.
  1136.  
  1137.           Example:
  1138.  
  1139.           10 ' This example is for mode 0.
  1140.           12 Mode% = 0 : Attr% = 0
  1141.           14 A$="" : P$=" (999)-999-9999" ' Picture for phone #.
  1142.           15 CALL MakePicture(P$,L%,0) 'Throw away error code!
  1143.           16 P$ = LEFT$(P$,L%) : L% = LEN(A$) : B$=SPACE$(14) 
  1144.           17 CALL SetL(a$,b$) : a$=b$ : PRINT "Enter Phone #";
  1145.           22 CALL Getstrd(A$,L%,P$,C%,Mode%)
  1146.           24 A$=LEFT$(A$,L%) : IF Mode%=-1 THEN 18
  1147.  
  1148.           10 ' This example is for mode 1.
  1149.           12 Mode%=1 : C%=31 : A$=""
  1150.           18 L%=LEN(A$) : B$=SPACE$(25) : CALL SetL(A$,B$) : A$ = B$
  1151.           20 LOCATE 10,5 : PRINT "Enter  Name : ";
  1152.           21 P1$="@K AAAAAAAAAAAAAAAAAAAAAAAAA"
  1153.           22 CALL MakePicture(P1$,L%,0) : P1$ = LEFT$(P1$,L%)
  1154.           23 CALL Getstrd(A$,L%,P1$,C%,Mode%)
  1155.           24 A$ = LEFT$(A$,L%) : IF Mode% = -1 THEN 36
  1156.           26 L% = LEN(C$) : B$=SPACE$(15) : CALL SetL(C$,B$) : C$ = B$
  1157.           28 LOCATE 11,5 : PRINT "Enter Phone # ";
  1158.           29 P$="@K (999)-999-9999" : CALL MakePicture(P$,L%,0)
  1159.           30 CALL Getstrd(C$,L%,P$,C%,Mode%)
  1160.           32 A$ = LEFT$(C$,L%) : IF Mode% = -1 THEN 36
  1161.           34 IF Mode%=72 OR Mode%=80 THEN 18
  1162.           36 PRINT "Data A: ";A$ : PRINT "Data B: ";C$ : END
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       21
  1188.  
  1189.           Routine Name   :    GLISSANDO 
  1190.           Arguments      :    ( [Start.Frequency%], [Stop.Frequency%] )
  1191.           Type           :    Sound
  1192.           Purpose        :    Generates a glissando sound from the starting
  1193.                               frequency to the stopping frequency.
  1194.           Description    :
  1195.  
  1196.           [Start.Frequency%],  [Stop.Frequency%]  specify  the frequencies.
  1197.           the  routines  will  determine  whether  to  go  up  or  down  in
  1198.           frequency.
  1199.  
  1200.           Example:
  1201.  
  1202.           CALL Glissando (950,650)
  1203.           ' Will produce a sound similar to SideKick(R) of Borland Intl.)
  1204.           CALL Glissando (-1,15)
  1205.           ' This  will produce  a glissando  from the  top frequency to the
  1206.           lowest (you won't hear  it  'till  about  -32767  but,  your pets
  1207.           might.)
  1208.  
  1209.  
  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.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.           22       BASIC Deluxe Version 1.72 (FINAL) February 1988
  1247.  
  1248.           Routine Name   :    GRID (Arguments changed, please note)
  1249.           Arguments      :    ( Rows%(start%), Columns%(start2%), [FRAME$],
  1250.                               [Color%], [Mode%] )
  1251.           Type           :    Video
  1252.           Purpose        :    Draws the specified grid on the screen.
  1253.           Description    :
  1254.  
  1255.           Author's Note: The order of the arrays was  changed (in reference
  1256.           to  the  argument  list)  to  make GRID consistent with the BASIC
  1257.           LOCATE command which works in a Row, Column order.
  1258.  
  1259.           Rows%(Start%),  This  array  specifies  the  heights   of  the  Y
  1260.           (Vertical) range of the grid. Each element in this array contains
  1261.           the cell Height of its corresponding row. All the cells  in a row
  1262.           will have  the same  cell height.  The last element in this array
  1263.           must be a -1.
  1264.  
  1265.           Columns%(start2%), This array specifies the widths of the X 
  1266.           (Horizontal) range  of  the  grid.  Each  element  in  this array
  1267.           contains the cell width of its corresponding column. All cells in
  1268.           a column will have the same cell width.  The last  element in the
  1269.           array must be a -1.
  1270.  
  1271.           Note: A  Cell height  or width of 0 (zero) is valid. Cell heights
  1272.           and widths are internal dimensions.
  1273.  
  1274.  
  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.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       23
  1306.  
  1307.           Routine Name   :    GRID (Continued)
  1308.  
  1309.           [FRAME$] This is the string that  specifies the  frame characters
  1310.           for the grid, The string consists of the following characters:
  1311.  
  1312.                  Character              Placement
  1313.           -----------------------------------------------------------------
  1314.           Top line
  1315.  
  1316.                     1                   Top left corner
  1317.                     2                   Top horizontal
  1318.                     3                   Top `T'
  1319.                     4                   Top right corner
  1320.  
  1321.           Cell lines
  1322.  
  1323.                     5                   Left vertical
  1324.                     6                   Fill character
  1325.                     7                   inner vertical
  1326.                     8                   Right vertical
  1327.  
  1328.           Cell separator
  1329.  
  1330.                     9                   Left `T'
  1331.                     10                  Inner Horizontal
  1332.                     11                  Inner `+'
  1333.                     12                  Right `T'
  1334.  
  1335.           Bottom line
  1336.  
  1337.                     13                  Bottom left corner
  1338.                     14                  Bottom horizontal
  1339.                     15                  Bottom `T'
  1340.                     16                  Bottom right corner
  1341.           -----------------------------------------------------------------
  1342.           [Mode%], This argument specifies the grow mode to use. Grow modes
  1343.           are as follows:
  1344.  
  1345.                0    No grow.
  1346.                1    Grow from the center of the grid.
  1347.                2    Grow from the top right corner.
  1348.                3    Grow from the top left corner.
  1349.                4    Grow from the bottom left corner.
  1350.                5    Grow from the bottom right corner.
  1351.  
  1352.           [Color%], here, you may specify  the  color  attribute  that GRID
  1353.           will use. The formula for the color value is as follows: color% =
  1354.           (BACKGROUND and 7) * 16 + FOREGROUND.
  1355.  
  1356.  
  1357.  
  1358.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.           24       BASIC Deluxe Version 1.72 (FINAL) February 1988
  1365.  
  1366.           Routine Name   :    GRID (Continued)
  1367.  
  1368.           The grid's top left corner will be at the current location of the
  1369.           cursor. Use the LOCATE command to set the location of the grid.
  1370.  
  1371.           Example:
  1372.           option base 1
  1373.           ' the option base of 1 is not necessary you
  1374.           ' may use option base 0 if you like but, remember to adjust 
  1375.           ' the starting of the array. (strt)
  1376.           '
  1377.           DIM R%(4),C%(5)
  1378.           C%(1)=20:C%(2)=20:C%(3)=20:C%(4)=-1 ' Last element MUST be a -1
  1379.           R%(1)=1 : R%(2)=1 : R%(3)=1 : R%(4)=0 : R%(5)=-1
  1380.           Attr%=7 : Mode%=1
  1381.           CALL Grid(R%(1),C%(1),FRAME$,Attr$,Mode%)
  1382.  
  1383.  
  1384.           Routine Name   :    GRIDSPAN 
  1385.           Arguments      :    ( Axis%(start%), Span% )
  1386.           Type           :    BASDLX GRID support
  1387.           Purpose        :    Determines  the  length,  from end to end, of
  1388.                               the given axis of the grid.
  1389.           Description    :
  1390.  
  1391.           Axis%(start%) is a  one-dimentional  array  as  specified  in the
  1392.           documentation for  the GRID  routine. This  array can be of the X
  1393.           (horizontal) or Y (vertical) axis of the grid.
  1394.  
  1395.           Span% is the value returned by  GRIDSPAN. It  represents the span
  1396.           of the supplied axis in characters.
  1397.  
  1398.           Example:
  1399.  
  1400.           DIM R%(5),C%(4)
  1401.           FOR I=1 TO 4 : R%(I)= 1 : NEXT : r%(5)=-1
  1402.           FOR I=1 TO 3 : C%(I)=20 : NEXT : c%(4)=-1
  1403.           CALL GridSpan(R%(1),Height%) : PRINT "Grid height is ";Height%
  1404.           CALL GridSpan(C%(1),Width%)  : PRINT "Grid width is  ";Width%
  1405.           Attr% = 7: Mode% = 1 : CALL Grid(C%(1),C%(1),FRAME$,Attr%,Mode%)
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       25
  1424.  
  1425.           Routine Name   :    GUN 
  1426.           Arguments      :    ( [Number_of_shots%] )
  1427.           Type           :    Speaker support
  1428.           Purpose        :    Simulates the sound of a gun or machine gun 
  1429.           Description    :
  1430.  
  1431.           This routine generates the sound by sending spurts of white noise
  1432.           to the speaker. This will create the sound of a  quick explosion.
  1433.           The only parameter needed is the number of shots to fire. 
  1434.  
  1435.           Example:
  1436.           INPUT "Number of shots to fire :",shots%
  1437.           CALL Gun(shots%)
  1438.  
  1439.  
  1440.           Routine Name   :    JRCLICK
  1441.           Arguments      :    ( [Value%] )
  1442.           Type           :    PCjr BIOS support.
  1443.           Purpose        :    Activates/deactivates    the  keyboard  click
  1444.                               on the PCjr.
  1445.           Description    :
  1446.  
  1447.           Value%, if 0 it  turns the  keyboard click  off. Any  other value
  1448.           will activate the keyboard click. This works only on the PCjr.
  1449.  
  1450.           Example :
  1451.  
  1452.           CALL Jrclick(0) 'rem deactivate the keyboard click
  1453.           Val%=1:CALL Jrclick(Val%) 'rem activate the keyboard click
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.           26       BASIC Deluxe Version 1.72 (FINAL) February 1988
  1483.  
  1484.           Routine Name   :    KEYORDER
  1485.           Arguments      :    (  [Row%],  [Column%],  [First%],  [Second%],
  1486.                               [Third%], [Last%], [Spread%] )
  1487.           Type           :    BASDLX KEYSTATS service.
  1488.           Purpose        :    Helps  simplify   the   positioning   of  the
  1489.                               `toggle' key prompts for use by KEYSTATS.
  1490.           Description    :
  1491.  
  1492.           [Row%], [Column%] specifies the starting row and column.
  1493.  
  1494.           [First%], [Second%],  [Third%], [Last%] each contain the key code
  1495.           value that  specify which  key comes  first, second...  If any of
  1496.           these  arguments   contain  zero,  KEYORDER  will  stop  on  that
  1497.           argument.
  1498.           SEE CNFKEYS for the table key codes.
  1499.  
  1500.           [Spread%] specifies the number of columns  to leave  between each
  1501.           prompt.
  1502.  
  1503.           KEYORDER will  then use the above data and adjust the Row, Column
  1504.           for each individual prompt to it's corresponding new location.
  1505.  
  1506.           Example:
  1507.  
  1508.           CALL KeyOrder(25,51,2,3,4,1,0) 
  1509.           ' will place the default prompt at the lower right corner of the
  1510.           ' screen. (" CAPS  NUM  SCROLL  INSERT ")
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       27
  1542.  
  1543.           Routine Name   :    KEYSTATS
  1544.           Arguments      :    ( [Mode%] )
  1545.           Type           :    Keyboard
  1546.           Purpose        :    Activates/Updates  the  `trapped'  key toggle
  1547.                               (Caps, Numbers, Scroll, Insert)
  1548.           Description    :
  1549.  
  1550.           [Mode%], if  zero, will update the prompts only if the keys have,
  1551.           changed; If  -1 will  disable `trapping'  If you  disable it with
  1552.           this  code,  the  internal  routines won't update the prompt. Any
  1553.           other value for [Mode%]  will force  a displaying  of the prompts
  1554.           (useful if you cleared the screen)
  1555.  
  1556.           The default `trapping' prompt is : " INSERT  CAPS  NUM  SCROLL "
  1557.           (assuming  all  of  the  key  toggles are active.) The message is
  1558.           displayed at the top left corner  of the  screen, using  white on
  1559.           black.  If  any  key  is  inactive,  the  respective text will be
  1560.           cleared to ASCII 32, also using white on black. 
  1561.           (i.e. " INSERT         NUM   SCROLL "  would appear  if only caps
  1562.           lock was off.) You can re-configure KEYSTATS with CNFKEYS.
  1563.  
  1564.           KEYSTATS is  not `shift blind' if you press any of the shift keys
  1565.           and both caps lock  and numbers  lock were  off, it  will reverse
  1566.           their  state  (visually).  It  knows  that if caps is off and any
  1567.           shift key is down,  you will  get capital  letters and  also that
  1568.           numbers will be produced on the key pad.
  1569.  
  1570.           SEE ALSO : CNFKEYS, KEYORDER, GETKSTATS
  1571.  
  1572.           Example:
  1573.           CLS : CALL KeyStats(1)             ' Activate
  1574.           .
  1575.           .
  1576.           Pany:A$ = INKEY$ : IF A$="" THEN CALL KeyStats(0) : GOTO Pany
  1577.           ' updates prompt while waiting for a key.
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.           28       BASIC Deluxe Version 1.72 (FINAL) February 1988
  1601.  
  1602.           Routine Name   :    MACHINE
  1603.           Arguments      :    ( Value% )
  1604.           Type           :    IBM machine type
  1605.           Purpose        :    Reads memory and returns machine code.
  1606.           Description    :
  1607.  
  1608.           Value%, upon  return the  value% will  contain a code number. Use
  1609.           the following table to determine the machine type:
  1610.  
  1611.           Code           Machine
  1612.           ----           -------
  1613.           255            PC
  1614.           254            PC-XT or Portable PC
  1615.           253            PCjr
  1616.           252            PC AT, PC XT 286, PS/2 Model 50 or 60
  1617.           251            PC-XT (BIOS DATE: 01/10/86 or 05/09/86)
  1618.           250            PS/2 Model 30
  1619.           249            PC Convertible
  1620.           248            PS/2 Model 80
  1621.  
  1622.           Note: The  identification  number  of  PC  compatibles  will most
  1623.           likely differ  from these  numbers. Some early XTs have a machine
  1624.           code of 255.
  1625.  
  1626.           The commercial version of BASIC Deluxe  will include  an expanded
  1627.           version of  the MACHINE  routine which  will allow you to further
  1628.           distinguish the machine type,  processor installed,  if 80x87 and
  1629.           all hardware.
  1630.  
  1631.           Example:
  1632.           call machine(code%):print "Identification code :";code%
  1633.  
  1634.  
  1635.           Routine Name   :    MAKEPICTURE
  1636.           Arguments      :    ( Picture$, Length%, Error% )
  1637.           Type           :    BASDLX GETSTRD support
  1638.           Purpose        :    Converts  the  supplied  Picture$ into BASDLX
  1639.                               compressed format.
  1640.           Description    :
  1641.  
  1642.           Picture$, this string contains the  picture  of  the  data field.
  1643.           BASIC Deluxe uses a format similar to the PICTURE clause in dBASE
  1644.           III. For those familiar with  dBASE  III,  you'll  feel  right at
  1645.           home. However,  there are a few exceptions to the format, that is
  1646.           not standard with dBASE. Please see section entitled  "Data Field
  1647.           `PICTURE'  Definitions"  at  the  of  this  documentation  for  a
  1648.           detailed description.
  1649.  
  1650.           Length%, this  value is  returned by  MAKEPICTURE and  is the new
  1651.           length for the Picture$, after compression.
  1652.  
  1653.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       29
  1660.  
  1661.           Routine Name   :    MAKEPICTURE (Continued)
  1662.  
  1663.           Error%,  should  be  zero  if  mask  compression  was successful,
  1664.           otherwise the following error numbers indicate the error:
  1665.  
  1666.              Error      Description                    Cause
  1667.           -----------------------------------------------------------------
  1668.                1    Null String              Picture$ is = "" (nothing)
  1669.                2    Function not supported   This  is  caused  because  you
  1670.                                              either  did  not  put  a space
  1671.                                              between   the   Functions  and
  1672.                                              Templates or, you attempted to
  1673.                                              select a non-existent function
  1674.                                              letter ( i.e. not "N" or "K" )
  1675.           -----------------------------------------------------------------
  1676.           DO NOT  SEND GETSTRD  or, any other routine that uses PICTURES, a
  1677.           Picture$ THAT  DID  NOT  GO  THROUGH  MAKEPICTURE  OR,  FAILED IN
  1678.           COMPRESSION ( Error%<>0 )
  1679.  
  1680.  
  1681.           Routine Name   :    MBUTTONM
  1682.           Arguments      :    ( Status% )
  1683.           Type           :    Mouse Support
  1684.           Purpose        :    Returns the status byte of the mouse buttons.
  1685.           Description    :
  1686.  
  1687.           This routine  simply reads the mouse button status and returns it
  1688.           in Status%. For the Microsoft Mouse this if bit 0 is active then,
  1689.           The left  button is  being held down and, if bit 1 is active then
  1690.           the right button is being  held  down.  Please  check  your mouse
  1691.           reference manual  for your  mouse, if other than Microsoft. (This
  1692.           routine uses mouse interrupt function 3 to get the status  of the
  1693.           buttons.)
  1694.  
  1695.           Example:
  1696.  
  1697.           CALL MbuttonM (B%)
  1698.           IF (B% AND 1) = 1 THEN PRINT "The left button is down."
  1699.           IF (B% AND 2) = 2 THEN PRINT "The right button is down."
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.           30       BASIC Deluxe Version 1.72 (FINAL) February 1988
  1719.  
  1720.           Routine Name   :    MBOUNDM
  1721.           Arguments      :    ( Row%, Column%, Height%, Width% )
  1722.           Type           :    Mouse Support
  1723.           Purpose        :    Defines the  mouse boundaries to restrict its
  1724.                               movement.
  1725.           Description    :
  1726.  
  1727.           Row% and Column% refer to the top left cursor coordinates  of the
  1728.           active screen.  If Row%  or Column%  is 0  then MBOUNDM will skip
  1729.           defining the boundary for  that axis  pair. An  axis pair  is the
  1730.           minimum and maximum value for the axis. Thus, Row% is the minimum
  1731.           and Row% + Height% - 1 is the maximum value for the Row (Y) axis.
  1732.  
  1733.           MBOUNDM works in all display modes.
  1734.  
  1735.           Example:
  1736.  
  1737.           CALL McursorM(1) : CALL MboundM(5,5,15,70)
  1738.           ' Restrict the movement of the mouse to this window.
  1739.           CALL MlocationM( 5,5,-1)
  1740.           p1:A$=INKEY$: IF A$="" THEN GOTO p1
  1741.           CALL MclearM
  1742.           ' Free mouse and center the cursor
  1743.           p2:A$=INKEY$: IF A$="" THEN GOTO p2
  1744.           CALL McursorM(0)
  1745.  
  1746.  
  1747.           Routine Name   :    MCLEARM
  1748.           Arguments      :    none
  1749.           Type           :    Mouse Support
  1750.           Purpose        :    clears all  mouse boundaries  and centers the
  1751.                               cursor on the screen.
  1752.           Description    :
  1753.  
  1754.           This routine will clear the boundaries (which are set by MBOUNDM)
  1755.           to allow the mouse to move  freely around  the entire  screen and
  1756.           center the cursor on the display. 
  1757.  
  1758.           Example:
  1759.  
  1760.           CALL McursorM(1) : CALL MboundM(5,5,15,70)
  1761.           ' Restrict the movement of the mouse to this window.
  1762.           CALL MlocationM( 5,5,-1)
  1763.           p1:A$=INKEY$: IF A$="" THEN GOTO p1
  1764.           CALL MclearM
  1765.           ' Free mouse and center the cursor
  1766.           p2:A$=INKEY$: IF A$="" THEN GOTO p2
  1767.           CALL McursorM(0)
  1768.  
  1769.  
  1770.  
  1771.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       31
  1778.  
  1779.           Routine Name   :    MCURSORM
  1780.           Arguments      :    ( [Mode%] )
  1781.           Type           :    Mouse Support
  1782.           Purpose        :    Activates  /  Deactivates  the standard mouse
  1783.                               cursor.
  1784.           Description    :
  1785.  
  1786.           If [Mode%]=0 then the cursor is deactivated. Any  non zero number
  1787.           will activate it.
  1788.  
  1789.           Example:
  1790.           call mcursorm(1)         'rem activate cursor
  1791.           .
  1792.           call mcursorm(0)         'turn it back off
  1793.  
  1794.  
  1795.           Routine Name   :    MERGEPICTURE
  1796.           Arguments      :    ( String$, Picture$ )
  1797.           Type           :    BASDLX GETSTRD support
  1798.           Purpose        :    Merges the PICTURE into the string.
  1799.           Description    :
  1800.  
  1801.           This routine  will merge a previously STRIPPICTURed String. Thus,
  1802.           inserting the literals back into String$.  The length  of String$
  1803.           must be  of the  total length of the mask in order for it to work
  1804.           properly, otherwise there may some data loss due  to the shifting
  1805.           of the characters.
  1806.  
  1807.           Example:
  1808.  
  1809.           Phonep$="  (999)  999-9999"  :  CALL MakePicture (Phonep$, L%, 0)
  1810.           PhoneP$ = LEFT$(PhoneP$,L%)
  1811.           ' The 0 was placed in the MakePicture Argument because we know it
  1812.           ' won't fail to compress.
  1813.           ph$="5555551212" : CALL PICTURELEN( PhoneP$, L%)
  1814.           ' This is what a STRIPPICTUREed string looks like
  1815.           a$=SPACE$(L%) : CALL SetL(ph$,a$) : ph$ = a$ ' Expand string
  1816.           CALL MergePicture( Ph$, PhoneP$ ) : PRINT Ph$
  1817.           ' Ph$ will look like : "(555) 555-1212"
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.           32       BASIC Deluxe Version 1.72 (FINAL) February 1988
  1837.  
  1838.           Routine Name   :    MESHPICTURE
  1839.           Arguments      :    ( String$, Picture$ )
  1840.           Type           :    BASDLX GETSTRD support
  1841.           Purpose        :    Meshes the Picture$ into String$.
  1842.           Description    :
  1843.  
  1844.           This routine  will just "lay" all the literals in the Picture$ in
  1845.           their respective position in String$. (GETSTRD automatically does
  1846.           this when you call it.) Any characters that are in the place of a
  1847.           literal will be overwritten.
  1848.  
  1849.           Example:
  1850.  
  1851.           Phonep$=" (999) 999-9999" :  CALL  MakePicture  (Phonep$,  L%, 0)
  1852.           PhoneP$ = LEFT$(PhoneP$,L%)
  1853.           ' The 0 was placed in the MakePicture Argument because we know it
  1854.           ' won't fail to compress.
  1855.           CALL PICTURELEN( PhoneP$, L%)
  1856.           Ph$ = SPACE$(L%) : CALL MeshPicture( Ph$, PhoneP$ ) : PRINT Ph$
  1857.           ' Ph$ will look like : "(   )    -    "
  1858.  
  1859.  
  1860.           Routine Name   :    MLOCATIONM
  1861.           Arguments      :    ( Row%, Column%, [Mode%] )
  1862.           Type           :    Mouse Support
  1863.           Purpose        :    Reads or sets the mouse cursor coordinates.
  1864.           Description    :
  1865.  
  1866.           The mode% argument: If  zero will  return the  coordinates in the
  1867.           virtual format.  If positive,  will return the coordinates in the
  1868.           active screen mode format. If negative, will set the mouse to the
  1869.           specified Row%, Column% (active display mode).
  1870.  
  1871.           MLOCATIONM works in all display modes.
  1872.  
  1873.           Example :
  1874.  
  1875.           CALL Mcursorm(1)
  1876.           CALL Mlocationm(13,40,-1) 'Set cursor at center
  1877.           continue:
  1878.           LOCATE 1,1
  1879.           CALL Mlocationm(r,c,1) 'return value in current screen mode
  1880.           PRINT "Row :",R;" Column :";C
  1881.           A$=INKEY$: IF A$="" THEN GOTO continue
  1882.           CALL Mcursorm(0)
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       33
  1896.  
  1897.           Routine Name   :    MPRESSRELM
  1898.           Arguments      :    (  Row%,  Column%, Count%, Button%, [Which%],
  1899.                               [Mode%] )
  1900.           Type           :    Mouse Support
  1901.           Purpose        :    Reads mouse  registers and  returns the press
  1902.                               or  release  information  for  the  specified
  1903.                               button.
  1904.           Description    :
  1905.  
  1906.           Row%, Column%, Count% are  all returned  by the  MPRESSRELM. Row%
  1907.           and Column%  is the  location of  the last  press/release for the
  1908.           specified Button%. Count% is the number  of times  the button has
  1909.           been  pressed/released  since  the  last  call  to MPRESSRELM for
  1910.           press/release information.  (Note: "press/release"  refers to one
  1911.           or the other, not both; Defined in [Which%].)
  1912.  
  1913.           Button% for  the Microsoft  Mouse: If 0 then the left button will
  1914.           be checked. If 1, the right button will  be checked.  Upon return
  1915.           from  MPRESSRELM  Buttons%  will  contain the value of the button
  1916.           statuses  (SEE  MBUTTONM  for  a  description).  If  you  are not
  1917.           interested in  the button  status then  you may  enter the button
  1918.           code directly in the argument list.
  1919.  
  1920.           [Which%], If 0 will  return  the  button  press  information. Any
  1921.           other value will return the release information.
  1922.  
  1923.           [Mode%], If  0 will  return the  Row% and  Column% in the virtual
  1924.           mode, any other value  will return  the Row%  and Column%  in the
  1925.           Active mode
  1926.  
  1927.           Example:
  1928.  
  1929.           PRINT "Press the mouse buttons a few times, then hit any key."
  1930.           p1:A$=INKEY$: IF A$="" THEN GOTO p1
  1931.           CALL MPressrelM ( R%,C%,CN%,0,0,1) ' --- Left ---
  1932.             PRINT "The LEFT button has been pressed";CN%;" times."
  1933.           CALL MpressRelM ( R%,C%,CN%,0,1,1)
  1934.             PRINT "The LEFT button has been released";CN%;" times."
  1935.           CALL MPressrelM ( R%,C%,CN%,1,0,1) ' --- Right ---
  1936.             PRINT "The RIGHT button has been pressed";CN%;" times."
  1937.           CALL MpressRelM ( R%,C%,CN%,1,1,1)
  1938.             PRINT "The RIGHT button has been released";CN%;" times."
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.           34       BASIC Deluxe Version 1.72 (FINAL) February 1988
  1955.  
  1956.           Routine Name   :    PICTURELEN
  1957.           Arguments      :    ( Picture$, Length% )
  1958.           Type           :    BASDLX picture Support
  1959.           Purpose        :    Returns the expanded length of the picture.
  1960.           Description    :
  1961.  
  1962.           Picture$ must first be processed by MAKEPICTURE before it is used
  1963.           with PICTURELEN or, any other BASDLX routine that uses pictures.
  1964.  
  1965.           Example:
  1966.  
  1967.           PhoneP$ = " (999) 999-9999" :  CALL MakePicture( Phonep$, L%, 0 )
  1968.           PhoneP$ = LEFT$(PhoneP$,L%)
  1969.           ' The 0 was placed in the MakePicture Argument because we know it
  1970.           ' won't fail to compress.
  1971.           CALL PICTURELEN( PhoneP$, L%) : PRINT " Picture Length = ",L%
  1972.           ' The length should be 14.
  1973.  
  1974.  
  1975.           Routine Name   :    READP
  1976.           Arguments      :    ( Port_number% )
  1977.           Type           :    Printer support
  1978.           Purpose        :    Reads  the  printer  status  of the specified
  1979.                               port number (1-3) and returns with the status
  1980.                               byte for that port in the Port_num% variable.
  1981.           Description    :
  1982.  
  1983.           The status byte of contains the following information:
  1984.  
  1985.           bit:     7    6    5    4    3    2-1  0
  1986.                    |    |    |    |    |    |    |_Time out
  1987.                    |    |    |    |    |    |_Unused
  1988.                    |    |    |    |    |_1 = I/O Error
  1989.                    |    |    |    |_1 = Selected 
  1990.                    |    |    |_1 = Out of Paper
  1991.                    |    |_1 = Acknowledge
  1992.                    |_1 = Not Busy
  1993.  
  1994.           IMPORTANT: This  routine does  not check for a valid port number.
  1995.           Be sure that the port number is in the range of 1-3
  1996.  
  1997.           Example:
  1998.           port%=1:call readp(port%):print port%
  1999.           if port% and 32=32 then print "Printer is out of paper"
  2000.           if port% and 128=0 then print "Printer is Off-line"
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       35
  2014.  
  2015.           Routine Name   :    RESETP
  2016.           Arguments      :    (Port_num%)
  2017.           Type           :    Printer support
  2018.           Purpose        :    Resets  the  specified  printer  port  number
  2019.                               (1-3) and  returns with  its status byte (see
  2020.                               the READP routine description for information
  2021.                               on the printer status byte)
  2022.  
  2023.           Description    :
  2024.           This routine sends a  reset status through the parallel interface
  2025.           of  the  specified  port  number.  This  routine  does  check the
  2026.           parameters to be sure that they are in the range of 1 to 3. If 
  2027.           the Port_num%  argument is equal to -1  upon return then the port
  2028.           number is not valid. 
  2029.  
  2030.           Example:
  2031.           port%=1:call resetp(port%):print port%
  2032.           if port%=-1 then print"Port number must be in the range  of 1-3" 
  2033.           if port% and 32=32 then print "Printer is out of paper"
  2034.           if port% and 128=0 then print "Printer is Off-line"
  2035.  
  2036.  
  2037.           Routine Name   :    SETL
  2038.           Arguments      :    ( Source$, Destination$ )
  2039.           Type           :    String service
  2040.           Purpose        :    This  routine  will  place  the source string
  2041.                               inside of the destination  left-justified. If
  2042.                               the   source   string   is  longer  than  the
  2043.                               destination string then the  right portion of
  2044.                               the string will be truncated.
  2045.           Description    :
  2046.  
  2047.           This  routine  automatically  clears  the  destination  string to
  2048.           spaces (ASCII 32) even if the source string is of length zero. Be
  2049.           sure to  save the destination string into the source string after
  2050.           the call.
  2051.  
  2052.           Example:
  2053.  
  2054.           A$="Enter Name":B$=SPACE$(20):CALL SetL(A$,B$):A$=B$
  2055.           ' the last command "a$=b$" saves the destination string in the
  2056.           ' source string since the routine cant' change the length of
  2057.           ' any string.
  2058.           PRINT ">";A";"<" ' This will show you the new length of A$
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.           36       BASIC Deluxe Version 1.72 (FINAL) February 1988
  2073.  
  2074.           Routine Name   :    SETR
  2075.           Arguments      :    ( Source$, Destination$ )
  2076.           Type           :    String
  2077.           Purpose        :    This routine  will  place  the  source string
  2078.                               inside    the    destination   string   right
  2079.                               justified.  If  the  destination   string  is
  2080.                               shorter than the source string then the right
  2081.                               portion of the string will be truncated.
  2082.           Description    :
  2083.  
  2084.           This routine automatically sets  the  destination  string  to all
  2085.           spaces (ASCII 32) even if the source string is of length zero. Be
  2086.           sure to save the destination string into the  source string after
  2087.           the call.
  2088.  
  2089.           Example:
  2090.  
  2091.           A$="Enter Name":B$=SPACE$(20):CALL SetR(A$,B$):A$=B$
  2092.           ' the last command "a$=b$" saves the destination string in the
  2093.           ' source string since the routine cant' change the length of
  2094.           ' any string.
  2095.           PRINT ">";A$;"<"  ' This will show you the new length of a$
  2096.  
  2097.  
  2098.           Routine Name   :    SNDOFF
  2099.           Arguments      :    NONE
  2100.           Type           :    Speaker support
  2101.           Purpose        :    Turns  speaker  off.  If this routine is used
  2102.                               then the BASIC SOUND  or  BEEP  commands will
  2103.                               not work.
  2104.           Description    :
  2105.  
  2106.           This  routine  can  be  useful  for those programs that use sound
  2107.           prompts to  get  attention  when  input  is  required.  With this
  2108.           routine you can easily add the feature to your programs that will
  2109.           let the user decide if he wants to have the  sound prompts  on or
  2110.           off. If  he wants  the off  then at the beginning of your program
  2111.           just call this routine. Any sound statements following  this com-
  2112.           mand will  execute without  producing a single sound. Be sure not
  2113.           to forget to turn them on before the program finishes (SNDON).
  2114.  
  2115.  
  2116.           Example :
  2117.           SOUND 200,1 : SOUND 300,1 : SOUND 400,1 : CALL Sndoff
  2118.           SOUND 200,1 : SOUND 300,1 : SOUND 400,1
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       37
  2132.  
  2133.           Routine Name   :    SNDON
  2134.           Arguments      :    NONE
  2135.           Type           :    Speaker support    
  2136.           Purpose        :    Turns sound  on so  that the  BASIC SOUND and
  2137.                               BEEP commands work.
  2138.           Description    :
  2139.  
  2140.           This routine  can help solve the problem that occurs when you use
  2141.           some memory resident programs that use the speaker  and when they
  2142.           are done the turn it off so that any SOUND or BEEP commands won't
  2143.           produce an audible signal. It can also turn on the  sound when it
  2144.           was turned off by the routine SNDOFF!
  2145.  
  2146.           Example:
  2147.  
  2148.           sound 200,1:sound 300,1:sound 400,1:call sndoff
  2149.           sound 200,1:sound 300,1:sound 400,1:call sndon
  2150.           sound 200,1:sound 300,1:sound 400,1
  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.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.           38       BASIC Deluxe Version 1.72 (FINAL) February 1988
  2191.  
  2192.           Routine Name   :    SPELLNUMBER
  2193.           Arguments      :    ( [Number%], String$, Length%, [Type%] )
  2194.           Type           :    String Service
  2195.           Purpose        :    Will      convert  the  number  in Number% to
  2196.                               written english  using,  ordinal  or cardinal
  2197.                               form. 
  2198.           Description    :
  2199.  
  2200.           Number%, any number you wish to convert to written form.
  2201.  
  2202.           String$, Here is where the spelled-out form of the number will be
  2203.           stored. Since the length of this string depends on how  large the
  2204.           number, use your own discretion as too how long to set it.
  2205.  
  2206.           Length%, Upon  return from  the routine  the length of the string
  2207.           will be returned in this variable.
  2208.  
  2209.           Type%, if type = 0 then  the cardinal  spelling will  be used for
  2210.           the number.  Cardinal numbers  are : one,two,three. . . Any other
  2211.           value will return the ordinal  spelling.  Ordinal  numbers  are :
  2212.           first,second,third. . .
  2213.  
  2214.           Example:
  2215.  
  2216.           n%=12:n$=space$(4):t%=0:call spellnumber(n%,n$,l%,t%) ' cardinal
  2217.           n$=left$(n$,l%):print "You have ";n$;" files available."
  2218.           call spellnumber(n%,n$,l%,t%):n$=left$(n$,l%) ' ordinal
  2219.           print "This is the ";n$;" day of the month."
  2220.  
  2221.  
  2222.           Routine Name   :    STRIPPICTURE
  2223.           Arguments      :    ( String$, Picture$, Length% )
  2224.           Type           :    BASDLX GETSTRD support
  2225.           Purpose        :    Removes the PICTURE from the String$.
  2226.           Description    :
  2227.  
  2228.           Shortens String$  by removing  all literals.  The Length% will be
  2229.           it's new length.
  2230.  
  2231.           Example:
  2232.  
  2233.           Phonep$=" (999) 999-9999" : CALL MakePicture (Phonep$, L%, 0)
  2234.           PhoneP$ = LEFT$(PhoneP$,L%)
  2235.           ' The 0 was placed in the MakePicture Argument because we know it
  2236.           ' won't fail to compress.
  2237.           ph$="(555) 555-1212"
  2238.           ' This is what a STRIPPICTUREed string looks like
  2239.           CALL StripPicture( Ph$, PhoneP$, L% ) : Ph$ = LEFT$( Ph$, L% )
  2240.           PRINT Ph$  ' Ph$ will look like : "5555551212"
  2241.  
  2242.  
  2243.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       39
  2250.  
  2251.           Routine Name   :    TIMESTR
  2252.           Arguments      :    (String_space$)
  2253.           Type           :    Time support
  2254.           Purpose        :    Reads  clock and loads String_space$ with the
  2255.                               time  in  decimal  ASCII.  The  format  is as
  2256.                               follows:  HH:MM:SS.HD  Where, HH are hours,MM
  2257.                               are  minutes,  SS  are  seconds  and,  HD are
  2258.                               Hundredths of a second.
  2259.           Description    :
  2260.  
  2261.           String_space$ must  be of  at least  11 characters  of length for
  2262.           this routine to work  successfully. If  it is  not of  the proper
  2263.           minimum length then the routine will do nothing and return with 
  2264.           the String_space$ unmodified.
  2265.  
  2266.           Example:
  2267.  
  2268.           t$=space$(11):call timestr(t$):print t$
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  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.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.           40       BASIC Deluxe Version 1.72 (FINAL) February 1988
  2309.  
  2310.                                    File Attributes
  2311.  
  2312.           The following  is a  table containing the attribute for each type
  2313.           of file:
  2314.  
  2315.           Attribute      Type                     Description
  2316.           -----------------------------------------------------------------
  2317.           0              Normal         Most files have this code.
  2318.  
  2319.           1              Read Only      This file may be read from but, NOT
  2320.                                         written  to.  (Write  protects just
  2321.                                         the file.)
  2322.  
  2323.           2              Hidden         This type of  file  is  hidden from
  2324.                                         the  normal   DIR  (DOS)  or  FILES
  2325.                                         (BASIC) command.
  2326.  
  2327.           4              System         Indicates it is a SYSTEM File.
  2328.           ----------------------------------------------------------------
  2329.           Note: It is valid  for a  file to  contain more  than one  of the
  2330.           above attributes.  i.e. a  file may  be Hidden and Read Only thus
  2331.           having an attribute of (2 (hidden) + 1 (Read Only)) = 3.
  2332.  
  2333.                                      MOUSE NOTES
  2334.  
  2335.           GETSTRD is the only routine that supports the use of the mouse as
  2336.           a pointing device.
  2337.  
  2338.           Every time the mouse is reset, through a software command,  there
  2339.           is about a second and a half or more, depending  on the  speed of
  2340.           your  machine,  of  a  delay.  This  unfavorable delay will cause
  2341.           several routines in BASDLX to slow  down a  program especially if
  2342.           several  calls  to  a  routine  are made. This delay only happens
  2343.           every time a mouse reset is  performed. It  is only  necessary to
  2344.           reset the  mouse once  in a  program. So,  I added  the routine :
  2345.           DLXMOUSE to let BASDLX routines know that a mouse is installed or
  2346.           not with-out  having to do the time consuming `software reset' on
  2347.           the mouse every time  the routine  is called.  This method should
  2348.           work well  with the  following exception: The mouse register that
  2349.           keeps  tab  on  the  cursor  (on/off)  is  a  decrement/increment
  2350.           register. This  means that if you execute the command to turn the
  2351.           cursor off two times in a row, you will need to execute  the com-
  2352.           mand to  turn the  cursor on,  two times again before you see the
  2353.           `mouse cursor' on the screen. The routines in BASDLX (that accept
  2354.           the mouse)  require that  the mouse cursor be on or, if off, just
  2355.           one command to turn the cursor on be necessary to show the `mouse
  2356.           cursor'.
  2357.  
  2358.  
  2359.  
  2360.  
  2361.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.                    BASIC Deluxe Version 1.72 (FINAL) February 1988       41
  2368.  
  2369.                            Data Field Picture Definitions
  2370.  
  2371.           The BASIC  Deluxe Picture$  argument is similar to that of dBASE.
  2372.           The first section defines any functions:
  2373.  
  2374.                Picture Functions
  2375.  
  2376.           The first character in  the string  must be  a "@".  This informs
  2377.           BASDLX that  the following  characters will select the functions.
  2378.           If no functions are used  then  skip  the  "@"  and  proceed with
  2379.           defining the template.
  2380.  
  2381.                     K         Clears  the  entire  field,  if the first key
  2382.                               struck is not a cursor positioning key. 
  2383.                     N         Defines this field as  a String-Numeric. This
  2384.                               function has an automatic `K' in it.
  2385.  
  2386.                String Picture Templates
  2387.  
  2388.           The  template  section  of  the  Picture$  begins  with  a  space
  2389.           character  (ASCII  32)  and  consists  of  any  of  the following
  2390.           template definitions:
  2391.  
  2392.                     #         Allows digits (0-9) and the "-" and "+" sign.
  2393.                     9         Allows only digits (0-9)
  2394.                     X         Allows    digits,    letters    and   special
  2395.                               characters.
  2396.                     N         Allows digits and letters only
  2397.                     U         Allows upper  case letters  only. (If letters
  2398.                               are  entered  in  lower  case,  they  will be
  2399.                               converted.)
  2400.                     L         Allows lower  case letters  only. (If letters
  2401.                               are  entered  in  upper  case,  they  will be
  2402.                               converted.)
  2403.                     B         Boolean, allows a "Y" or "N"  response. (Will
  2404.                               convert letters to upper case.)
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.           42       BASIC Deluxe Version 1.72 (FINAL) February 1988
  2427.  
  2428.                      Data Field Picture Definitions (Continued)
  2429.  
  2430.                Numeric Picture Templates
  2431.  
  2432.           The following  template definitions  apply only when the field is
  2433.           defined String-Numeric via the @N Function. These characters will
  2434.           be treated as literals if not in the String-Numeric mode.
  2435.  
  2436.                     .         Defines the decimal point
  2437.                     ,         Displayed  only  if  there are numbers to the
  2438.                               left of it.
  2439.                     $         Just like # but, will show a `$'  if there is
  2440.                               no digit or sign in its place.
  2441.                     *         Just like # but, will show an `*' if there is
  2442.                               no digit or sign in its place.
  2443.                     9 and #   Function just like in String mode.
  2444.  
  2445.           Any other character will be treated  as  a  literal  and  will be
  2446.           copied to  the input  string exactly as it appears and the cursor
  2447.           will just skip over them.
  2448.  
  2449.  
  2450.           Examples:
  2451.  
  2452.           String:
  2453.  
  2454.           Pdate$     ="@K ##/##/##"               'Field to enter the date
  2455.           Pfirstname$=" AAAAAAAAAAAAAAAAAAAA"     'Field to enter a name
  2456.           Pphone$    ="@K (999)-999-9999"         'Field to enter a phone #
  2457.           Pzip4$     ="@K 99999-9999"
  2458.           'A zip code is not necessarily numeric data
  2459.  
  2460.           Numeric:
  2461.  
  2462.           Pamount$  ="@NK ###,###,###.99"    'Field to enter an amount
  2463.           Pquantity$="@KN 9999999"           'Field to enter a quantity
  2464.  
  2465.           NOTE: In Pamount$ and Pquantity$ the "K" is not necessary because
  2466.           it is automatic. The  Function  declarations  are  not  place nor
  2467.           order dependant, as long as they are together ("@KN").
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.               BASDLX Copyright (C) 1986,1987,1988 By Gustavo H. Verdun
  2480.