home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / qlib.zip / QB1.MAN < prev    next >
Text File  |  1991-02-05  |  63KB  |  1,429 lines

  1. Q Q  
  2.  
  3.  
  4. QB1 ROUTINES & FUNCTIONS                                                       1
  5. ════════════════════════════════════════════════════════════════════════════════
  6.  
  7. ANAM$      ANAM$ (N$,L%)                                  QB1...........FUNCTION
  8.  
  9.            ANAM$ takes a string N$ and checks it for length L.  If N$ is longer
  10.            then L ANAM$ reduces the first word in the string to an initial and
  11.            a period, for example ANNAM$("Johann Browzalwoski",16) would return
  12.            J. Browzalwoski.  If the abreviated string is still longer than L
  13.            then only the first L letters of the string are returned.
  14.  
  15.  
  16. ARG$       ARG$ (N%)                                      QB1...........FUNCTION
  17.  
  18.            ARG$(N%) returns field N from the string A$ set by ARGS(A$,S$).
  19.  
  20.  
  21. ARGS%      ARGS% (A$,S$)                                  QB1...........FUNCTION
  22.  
  23.            ARGS%(A$,S$) separates the string A$ into fields using S$ as a field
  24.            separator, stores the fields, and returns the number of fields.  A
  25.            string must be separated by ARGS before it is accessible to ARG$.
  26.  
  27.  
  28. ARKEY      ARKEY (P%,R%,C%)                               QB1........SUB ROUTINE
  29.  
  30.            ARKEY moves the cursor via the arrow keys.  P is the key code,
  31.            H is the row and C is the column.  Key codes are read in the values
  32.            used by KEYIN.
  33.  
  34.  
  35. ASCII      ASCII                                          QB1........SUB ROUTINE
  36.  
  37.            Prints a full screen ASCII chart
  38.  
  39.  
  40. ASCNUM$    ASCNUM$ (F$)                                   QB1...........FUNCTION
  41.  
  42.            Turns a string of characters into a string of numbers which are the
  43.            decimal ASCII values of the characters.  Each number is separated
  44.            by a space.  ASCNUM("AB") would return 65 66.
  45.  
  46.  
  47. ASF%       ASF% (A$)                                      QB1...........FUNCTION
  48.  
  49.            ASF(A$) opens a sequential file for appending and returns the file
  50.            number as the value of ASF.
  51.  
  52.  
  53. BKEY       BKEY                                           QB1........SUB ROUTINE
  54.  
  55.            Sets the key combinations CTL END, CTL BKSP, and CTL ALT DEL to abort
  56.            programs.  BKEY should be called in the main module with all modules
  57.            compiled using the  /V option for BKEY to have effect throughout the
  58.            program.  If BKEY is called in the main module and a break sequence
  59.            is entered in a module not compiled with /V the program will not end
  60.            until the main module is accessed again.
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. QB1 ROUTINES & FUNCTIONS                                                       2
  68. ════════════════════════════════════════════════════════════════════════════════
  69.  
  70. BOFM%      BOFM%                                          QB1...........FUNCTION
  71.  
  72.            BOFM returns the number of the last print line on a page.  This
  73.            function is only valid if the printer has been defined with PRTDEF.
  74.  
  75.  
  76. BOXC       BOXC                                           QB1........SUB ROUTINE
  77.  
  78.            BOXC closes boxes opened with BOXO.
  79.  
  80.  
  81. BOXO       BOXO (T%,B%,C%,W%)                             QB1........SUB ROUTINE
  82.  
  83.            BOXO opens a box in the screen.
  84.  
  85.                 T%   is the starting row of the box.
  86.                 B%   is the ending row.
  87.                 C%   is the starting column.
  88.                 W%   is the width of the box.
  89.  
  90.  
  91. CCNV$      CCNV$ (A$)                                     QB1...........FUNCTION
  92.  
  93.            CCNV parses a line of text and replaces any control characters found
  94.            with the ASCII notation ^CHAR where CHAR is the character designator.
  95.            The modified line is returned as the function value.
  96.  
  97.  
  98. CDIR$      CDIR$ (D$)                                     QB1...........FUNCTION
  99.  
  100.            CDIR$ returns the value of the current directory path for drive D$
  101.            in the same manner that the DOS command CD D$ would return it.  If
  102.            D$ is nul then the current drive is assumed.  If D$ is an invalid
  103.            drive then a null string is returned.
  104.  
  105.  
  106. CDRV%      CDRV%                                          QB1...........FUNCTION
  107.  
  108.            CDRV% returns the value of the current disk drive in numeric format
  109.            with 0 being drive A and 25 being drive Z.  To get the current drive
  110.            in ASCII just use the command D$=CHR$(CDRV%+65).
  111.  
  112.  
  113. CELSIUS#   CELSIUS# (F)                                   QB1...........FUNCTION
  114.  
  115.            CELSIUS# returns the temperature in Celsius for F degrees Fahrenheit.
  116.  
  117.  
  118. CENTER%    CENTER% (A$)                                   QB1...........FUNCTION
  119.  
  120.            CENTER(A$) returns the value of the left margin on the screen to
  121.            print the string A$ centered on an 80 character display.
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128. QB1 ROUTINES & FUNCTIONS                                                       3
  129. ════════════════════════════════════════════════════════════════════════════════
  130.  
  131. CHDRV%     CHDRV% (DL%)                                   QB1...........FUNCTION
  132.  
  133.            CHDRV changes the current drive to DL where DL is a valid drive
  134.            number from 0 to 25 with 0=A, 1=B, etc.  If DL is an invalid drive
  135.            or a drive change is not made then CHDRV returns a 0 else it returns
  136.            a value of 1.
  137.  
  138. CKDIR%     CKDIR% (A$)                                    QB1...........FUNCTION
  139.  
  140.            CKDIR checks the validity of directory A$ and returns either a true
  141.            or false depending upon the existence of the directory.
  142.  
  143.  
  144. CKDRV%     CKDRV% (DR%)                                   QB1...........FUNCTION
  145.  
  146.            CKDRV checks the validity of drive number DR and returns either a
  147.            true or false depending upon the existence of the drive.
  148.  
  149.  
  150. CKFILE     CKFILE (F$)                                    QB1........SUB ROUTINE
  151.  
  152.            CKFILE checks for the existence of file F$ and aborts the program
  153.            with an error message if the file does not exist.
  154.  
  155.  
  156. CLEAN$     CLEAN$ (F$)                                    QB1...........FUNCTION
  157.  
  158.            CLEAN$(F$) strips all ASCII 0 characters from the string F$.  This
  159.            can be used to clean up strings from TYPE fields which are padded
  160.            with the ASCII 0 character.
  161.  
  162.  
  163. CLKTIME$   CLKTIME$ (T)                                   QB1...........FUNCTION
  164.  
  165.            CLKTIME$ returns an HR:MN time format for a decimal time.  For
  166.            example CLKTIME$(4.5) would return 04:30.
  167.  
  168.  
  169. CLMENU     CLMENU                                         QB1........SUB ROUTINE
  170.  
  171.            CLMENU clears data from the exisiting menu when using the function
  172.            MENU.  CLMENU should be called each time before reloading the menu
  173.            with the LDMENU sub routine.
  174.  
  175.  
  176. CMETER#    CMETER# (I)                                    QB1...........FUNCTION
  177.  
  178.            CMETER# returns the number of centimeters in I inches.
  179.  
  180.  
  181. CMON$      CMON$ (A$)                                     QB1...........FUNCTION
  182.  
  183.            CMON converts three letter month notations to numeric strings in the
  184.            manner of CMON$("Feb") which returns a value of 02.
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191. QB1 ROUTINES & FUNCTIONS                                                       4
  192. ════════════════════════════════════════════════════════════════════════════════
  193.  
  194. CMOV       CMOV (P%,H%,V%,T%,B%,L%,R%)                    QB1........SUB ROUTINE
  195.  
  196.            CMOV moves the cursor inside a box.  P is the input code, H is the
  197.            row, V is the column, T is top of box, B is bottom of box, L is the
  198.            left side and R is the right side.
  199.  
  200.  
  201. COLBG%     COLBG% (N%)                                    QB1...........FUNCTION
  202.  
  203.            COLBG returns the BASIC background color value for the color N set by
  204.            the COLORINT or COLORCFG routines.  The values for N are:
  205.  
  206.                 1 - Normal
  207.                 2 - Highligt
  208.                 3 - Reverse
  209.  
  210.  
  211. COLFG%     COLFG% (N%)                                    QB1...........FUNCTION
  212.  
  213.            COLFG returns the BASIC foreground color value for the color N set by
  214.            the COLORINT or COLORCFG routines.  The values for N are as in COLBG.
  215.  
  216.  
  217. COLORATB   COLORATB (F%,B%)                               QB1...........FUNCTION
  218.  
  219.            COLORATB returns the DOS color attribute for the BASIC color F,B
  220.            where F is foreground and B is background.
  221.  
  222.  
  223. COLORBAS   COLORBAS (A%,F%,B%)                            QB1........SUB ROUTINE
  224.  
  225.            COLORBAS takes the DOS color attribute A and returns the BASIC color
  226.            equivalent as F = foreground and B = background.
  227.  
  228.  
  229. COLORCFG   COLORCFG                                       QB1........SUB ROUTINE
  230.  
  231.            COLORCFG displays a color chart showing the 128 available attributes,
  232.            and prompts the user to set the systems default colors for normal,
  233.            highlight, and reverse video.  The system is then set with COLORSET
  234.            to the normal attribute.
  235.  
  236.  
  237. COLORINT   COLORINT (NF%,NB%,HF%,HB%,RF%,RB%)             QB1........SUB ROUTINE
  238.  
  239.            COLORINT is used to set default colors for the system and enables the
  240.            use of several display options that reduce repetitive coding.  The
  241.            difference between COLORINT and COLORCFG are that COLORCFG responds
  242.            to user input while COLORINT sets programmer defined colors.  The
  243.            values for COLORINT in BASIC format are:
  244.  
  245.                  NF = Normal foreground          NB = Normal background
  246.                  HF = Highlight foreground       HB = Highlight background
  247.                  RF = Reverse foreground         RB = Reverse background
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254. QB1 ROUTINES & FUNCTIONS                                                       5
  255. ════════════════════════════════════════════════════════════════════════════════
  256.  
  257. COLORMAP   COLORMAP                                       QB1........SUB ROUTINE
  258.  
  259.            COLORMAP displays the 128 non-blinking DOS color attributes in their
  260.            colors.
  261.  
  262.  
  263. COLORSET   COLORSET (N%)                                  QB1........SUB ROUTINE
  264.  
  265.            COLORSET sets the current color to N using the values recorded by
  266.            COLORCFG or COLORINT where N is 1, 2, or 3 for normal, highlight, and
  267.            reverse color.
  268.  
  269.  
  270. COLPR      COLPR (R%,C%,A%,D$)                            QB1........SUB ROUTINE
  271.  
  272.            COLPR locates at R,C and prints string D$ using the color value A
  273.            where A is either 1, 2, or 3 as defined by COLORSET.  The system is
  274.            then returned to the color in effect before COLPR was called.
  275.  
  276.  
  277. CONCAT$    CONCAT$ (F$,N%)                                QB1...........FUNCTION
  278.  
  279.            CONCAT$ concatenates a string F$ onto itself N times.  Thus the
  280.            command X$=CONCAT$("X0",10) returns X$ as X0X0X0X0X0X0X0X0X0X0.
  281.  
  282.  
  283. COORD      COORD (X%,H%,V%)                               QB1........SUB ROUTINE
  284.  
  285.            COORD returns the row H and column V of the cursor based on the
  286.            absolute screen address of X which is from 0 to 4000 in steps of 2.
  287.  
  288.  
  289. COPY       COPY (S$,D$)                                   QB1........SUB ROUTINE
  290.  
  291.            COPY copies source file S$ to destination file D$.
  292.  
  293.  
  294. CPRINT     CPRINT (R%,C%,D$,N1%,N2%,R1%,R2%)              QB1........SUB ROUTINE
  295.  
  296.            CPRINT prints the string D$ at R,C in colors R1,R2 then resets the
  297.            system to N1,N2.
  298.  
  299.  
  300. CURZ       CURZ (N%)                                      QB1........SUB ROUTINE
  301.  
  302.            CURZ sets the cursor size N with 0 being the smallest size and 12
  303.            the largest size cursor.
  304.  
  305.  
  306. CVBASE     CVBASE (BN%,NM%,B1%,B2%)                       QB1........SUB ROUTINE
  307.  
  308.            CVBASE takes a decimal number NM and using a base of BN returns
  309.            B1 the number of base units in the number, and B2 the remainder.
  310.            Thus CVBASE 8,16,X,Y would return X=2 and Y=0.
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317. QB1 ROUTINES & FUNCTIONS                                                       6
  318. ════════════════════════════════════════════════════════════════════════════════
  319.  
  320. D2B        D2B (D%,B1%,B2%)                               QB1........SUB ROUTINE
  321.  
  322.            D2B takes a decimal number D and returns its 256 base value in the
  323.            manner of CVBASE.
  324.  
  325.  
  326. DATERR     DATERR (E$,M$,D$)                              QB1........SUB ROUTINE
  327.  
  328.            DATERR is an internal procedure for datemath functions.  It prints an
  329.            error message on receiving ERROR in E$.  M$ is the function in which
  330.            the error occurred, and D$ is the bad date string.
  331.  
  332.  
  333. DAYNUM%    DAYNUM% (A$,B$)                                QB1...........FUNCTION
  334.  
  335.            DAYNUM returns the value of the difference in days between two dates,
  336.            A$ and B$ which must be expressed in either the YYMMDD format or the
  337.            YYYYMMDD format.  Invalid dates halt program.
  338.  
  339.  
  340. DECTIME    DECTIME (T$)                                   QB1...........FUNCTION
  341.  
  342.            DECTIME returns HR:MN time in hours in decimal format.  For example
  343.            DECTIME("04:30") would return 4.5.
  344.  
  345.  
  346. DEFPRT     DEFPRT (F$)                                    QB1........SUB ROUTINE
  347.  
  348.            DEFPRT is an input routine for defining printer codes in the file
  349.            F$.  DEFPRT reads in the codes in the file if it exists, then loops
  350.            in an input screen for additions or modifications, and saves the
  351.            changes in the file upon exit.  All code fields only accept valid
  352.            three digit ASCII code numbers.  The program automatically pads one
  353.            and two digit numbers, and automatically spaces between numbers.
  354.            DEFPRT creates files for use by the printer code routine PRTDEF.
  355.  
  356.  
  357. DELIN      DELIN (P%,R%,C%,D$,I%,L%)                      QB1........SUB ROUTINE
  358.  
  359.            DELIN performs DELETE and INSERT operations on a field using the with
  360.            the following parameters:
  361.  
  362.                P% is the signal sent to DELIN.
  363.                   -83 = Delete character
  364.                   -82 = Insert space
  365.                     4 = Delete to end of field
  366.                     8 = Backspace and delete character
  367.  
  368.                R% is row
  369.                C% is the screen column
  370.                I% is the field location
  371.                L% is the field length.
  372.                D$ is the filed string.
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379. QB1 ROUTINES & FUNCTIONS                                                       7
  380. ════════════════════════════════════════════════════════════════════════════════
  381.  
  382. DNUM#      DNUM# (N$,D%)                                  QB1...........FUNCTION
  383.  
  384.            DNUM takes a number in string format N$ and a value indicating the
  385.            number of decimal places D and returns N$ in decimal to D places and
  386.            the value of DNUM as the double precision value of N$.
  387.  
  388.  
  389. DRIVE$     DRIVE$ (N%)                                    QB1...........FUNCTION
  390.  
  391.            DRIVE$ returns the letter of drive N if N is a valid drive number
  392.            from 0 to 25.  DRIVE$ also appends the colon to the drive.  For
  393.            example DRIVE$(0) would return A:.  An invalid number returns a null.
  394.  
  395.  
  396. DRIVN%     DRIVN% (D$)                                    QB1...........FUNCTION
  397.  
  398.            DRIVN returns the drive number for a valid drive letter A to Z and a
  399.            -1 for an invalid character.  DRIVN is not case sensitive.
  400.  
  401.  
  402. DSUM       DSUM (N,P$,P%)                                 QB1........SUB ROUTINE
  403.  
  404.            N  is the input number
  405.            P$ is number in string format
  406.            P  is the specified string length
  407.  
  408.            DSUM takes a number and rounds it to a two place decimal number.  It
  409.            then creates a string with the two decimals padded with zeros if they
  410.            are blank.  If the length of the string is less than P then the front
  411.            of the string is padded by spaces to give the required length.
  412.  
  413.  
  414. DVDR%      DVDR% (A$,DV$,DR$)                             QB1...........FUNCTION
  415.  
  416.            DVDR takes a string A$ and divides it into a drive DV$ and directory
  417.            DR$.  If an invalid drive or directory is encountered DVDR returns
  418.            a false value, otherwise a true is returned.
  419.  
  420.  
  421. EDCK%      EDCK% (A$,I%)                                  QB1...........FUNCTION
  422.  
  423.            EDCK returns an edit value for the character at MID$(A$,I,1).
  424.            The values are:
  425.  
  426.                 Character   Value
  427.                 ═════════   ═════
  428.                 A-Z           1
  429.                 0-9           2
  430.                 space         3
  431.                 .             4
  432.                 -             5
  433.                 ,             6
  434.                 %             7
  435.                 $             8
  436.                 any punct.    9
  437.                 fail          0
  438.  
  439.  
  440.  
  441.  
  442.  
  443. QB1 ROUTINES & FUNCTIONS                                                       8
  444. ════════════════════════════════════════════════════════════════════════════════
  445.  
  446. ENVCL      ENVCL                                          QB1........SUB ROUTINE
  447.  
  448.            ENVCL clears the environment string of all variables except the PATH
  449.            and COMSPEC variables.  It then sets the fields ENVT and ENVF which
  450.            hold the values of the total environment space available for use, and
  451.            the current amount of space free.  ENVCL must be invoked prior to the
  452.            use of ENVFR or ENVSET functions.
  453.  
  454.  
  455. ENVFR%     ENVFR%                                         QB1...........FUNCTION
  456.  
  457.            ENVFR returns the number of bytes free in the environment space.
  458.  
  459.  
  460. ENVSET%    ENVSET% (A$)                                   QB1...........FUNCTION
  461.  
  462.            ENVSET(A$) checks to see if there is enough space in the environment
  463.            string to set A$, and if there is it sets it and adjusts the space
  464.            counter by the number of bytes added or deleted.  ENVSET returns a
  465.            true value of -1 if successful, or a false value of 0 if it fails.
  466.  
  467.  
  468. EXINT      EXINT (IR%,AH%,AL%,BH%,BL%,CH%,CL%,DH%,DL%,    QB1........SUB ROUTINE
  469.                   BP%,SI%,DI%,FG%,DS%,ES%)
  470.  
  471.            EXINT performs a system interrupt request where IR is the interrupt
  472.            and AH thru ES are the registers with AX thru DX split into high and
  473.            low.  On the return the register parameters contain the values of the
  474.            registers as modified by the interrupt call.
  475.  
  476.  
  477. EXIST%     EXIST% (A$)                                    QB1...........FUNCTION
  478.  
  479.            EXIST checks for the existence of the file A$ and returns TRUE
  480.            or FALSE as -1 or 0 per BASIC protocol so that the statement
  481.            IF EXIST(A$) THEN XYZ will execute XYZ if A$ is a valid file.
  482.  
  483.  
  484. FAHREN#    FAHREN# (C)                                    QB1...........FUNCTION
  485.  
  486.            FAHREN# returns the Farhrenheit temperture for C degrees celsius.
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493. QB1 ROUTINES & FUNCTIONS                                                       9
  494. ════════════════════════════════════════════════════════════════════════════════
  495.  
  496. FED$       FED$ (D$,N%)                                   QB1...........FUNCTION
  497.  
  498.            FED$ is a edit filter which returns an edited version of D$ using
  499.            code N.  Edit codes are:
  500.  
  501.                 1.  All uppercase
  502.                 2.  All lower case
  503.                 3.  If a valid YYYYMMDD or YYMMDD date is entered it is returned
  504.                     else a nul string is returned.
  505.                 4.  If a valid HR:MN time is entered then it is returned in 24
  506.                     hour notation, else a nul string is returned.
  507.                 5.  If a valid HR:MN time is entered then it is returned in 12
  508.                     hour notation, else a nul string is returned.
  509.                 6.  String is converted to its numeric value and a two place
  510.                     decimal number is then returned as a string.
  511.                 7.  String is converted to its numeric value then returned as
  512.                     a string with a minimum of two digits, left padding a zero
  513.                     onto numbers less than 10.
  514.                 8.  String is converted to its numeric value then returned as
  515.                     a string with a minimum of three digits, left padding one or
  516.                     two zeros when necessary.
  517.                 9.  Evaluates for either Y or N in either case.  If Y or N then
  518.                     it returns the upper case value else nul string is returned.
  519.                 0.  Any other value ignores edits and returns input string.
  520.  
  521.  
  522. FEET#      FEET# (M)                                      QB1...........FUNCTION
  523.  
  524.            FEET# returns the value of M meters in feet.
  525.  
  526.  
  527. FILOC$     FILOC$ (A$)                                    QB1...........FUNCTION
  528.  
  529.            FILOC$ searches for the file A$ as input, then in all paths in the
  530.            PATH environment for PATH\A$.  If a file is located FILOC exits with
  531.            the full path of the file, otherwise FILOC exits as an empty string.
  532.  
  533.  
  534. FIN        FIN                                            QB1........SUB ROUTINE
  535.  
  536.            FIN sets the video to black background, clears the screen, and ends
  537.            the program.
  538.  
  539.  
  540. FLIST%     FLIST% (N$)                                    QB1...........FUNCTION
  541.  
  542.            FLIST does a DIR on the string N$ then loads all of the files listed
  543.            into an array accessed by FLST$.  FLIST returns the number of records
  544.            in the array.  Files are sorted in ASCII order and the limit is 200.
  545.  
  546.  
  547. FLST$      FLST$ (N%)                                     QB1...........FUNCTION
  548.  
  549.            FLST$(N) returns the Nth record in the FLIST array.
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556. QB1 ROUTINES & FUNCTIONS                                                      10
  557. ════════════════════════════════════════════════════════════════════════════════
  558.  
  559. FMT$       FMT$ (N%)                                      QB1...........FUNCTION
  560.  
  561.            FMT$(N) returns the Nth format set by the command SETFORM.  IF the
  562.            Nth format does not exist then the format is set to &.
  563.  
  564.  
  565. GALLON#    GALLON# (L)                                    QB1...........FUNCTION
  566.  
  567.            GALLON# returns the value of L liters in gallons.
  568.  
  569.  
  570. GETCOL     GETCOL (X%,F%,B%)                              QB1........SUB ROUTINE
  571.  
  572.            GETCOL looks into screen address X, an odd number for attributes,
  573.            and returns the BASIC values F for foreground and B for background.
  574.            Using the function SPOT the address for the cursor would be SPOT+1.
  575.  
  576.  
  577. GETFDAT    GETFDAT (F$,D$(),BR%,BE%,EE%,TR%,RL%)          QB1........SUB ROUTINE
  578.  
  579.            GETFDAT opens file F$ the loads it into array D$() starting at array
  580.            record BR.  Each file record read is put into an array element.  The
  581.            routine starts at element BE and sequentially places new records into
  582.            the array record until element EE has been filled.  Then the record
  583.            is incremented and the process repeats until either an EOF is reached
  584.            or record limt RL is reached.  The file is closed and the number of
  585.            the last array record loaded is returned as TR.
  586.  
  587.  
  588. GETW%      GETW% (A$)                                     QB1...........FUNCTION
  589.  
  590.            GETW returns the character width for character A$ set by SETW.
  591.  
  592.  
  593. GRAM#      GRAM# (OZ)                                     QB1...........FUNCTION
  594.  
  595.            GRAM# returns the value in grams of OZ ounces avoirdupois.
  596.  
  597.  
  598. HMOVE      HMOVE (P%,I%,L%,TB%)                           QB1........SUB ROUTINE
  599.  
  600.            HMOVE moves the cursor horizontaly within a field without altering
  601.            the field.  Parameters are:
  602.  
  603.                P  is the input signal.
  604.                   -77 = Right Arrow
  605.                   -75 = Left Arrow
  606.                   -15 = Back Tab / Shift Tab
  607.                     9 = Tab
  608.                 I  is the location in the string.
  609.                 L  is the string length.
  610.                 TB is the tab increment value.
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617. QB1 ROUTINES & FUNCTIONS                                                      11
  618. ════════════════════════════════════════════════════════════════════════════════
  619.  
  620. HOURS      HOURS (T1$,T2$)                                QB1...........FUNCTION
  621.  
  622.            HOURS returns the number of hours in decimal format between times
  623.            T1$ and T2$ where the times are expressed in 24 hour HR:MN format.
  624.  
  625.  
  626. INCH#      INCH# (CM)                                     QB1...........FUNCTION
  627.  
  628.            INCH# returns the value in inches of CM centimeters.
  629.  
  630.  
  631. INCODE%    INCODE% (D$,L%)                                QB1...........FUNCTION
  632.  
  633.            INCODE is a special input routine for ASCII three digit codes where
  634.            D$ is the string containing the codes and L is the length of the
  635.            string.  Input takes numbers only and fills cells of three digits
  636.            with spaces between up to the length of the string.  Space and Tab
  637.            jump cursor to next cell.  Left Arrow moves cursor left, Enter, Down
  638.            Arrow, and Up Arrow record string and exit.  Del deletes cell, and
  639.            Esc exits without recording.  INCODE returns the ASCII value of the
  640.            exiting signal in accordance with the KEYIN routine.  Down arrow is
  641.            changed to Enter.
  642.  
  643.  
  644. INFLD%     INFLD% (F$,L%)                                 QB1...........FUNCTION
  645.  
  646.            INFLD takes a string F$ and a string length L and goes into an input
  647.            routine until the string end is reached or a control key is entered.
  648.            If the string end is reached the control code 13 is automatically
  649.            called to end input.  Upon return the modified string is in F$ and
  650.            the value of the control key is in INFLD.  Key values are those used
  651.            in KEYIN.  ASCII 32 to 126 are treated as text, all other codes are
  652.            treated as control codes.
  653.  
  654.  
  655. INLINE$    INLINE$                                        QB1...........FUNCTION
  656.  
  657.            INLINE$ reads input from redirection until the CHR$(10) character is
  658.            encountered, or input is null, then returns the input as value.
  659.            Unlike LINE INPUT, INLINE does not echo the input string.
  660.  
  661.  
  662. JULCV$     JULCV$ (Y%,JD%)                                QB1...........FUNCTION
  663.  
  664.            JULCV converts a Julian date into a date string in the format YYMMDD
  665.            or YYYYMMDD depending upon the year input.  Two digit years before
  666.            51 are increased by 2000.  Those of 51 to 99 are increased by 1900.
  667.  
  668.                 Y  is the year.
  669.                 JD is the Julian date in that year.
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676. QB1 ROUTINES & FUNCTIONS                                                      12
  677. ════════════════════════════════════════════════════════════════════════════════
  678.  
  679. JULIAN%    JULIAN% (Y$)                                   QB1...........FUNCTION
  680.  
  681.            JULIAN returns the Julian date for a YYYYMMDD or YYMMDD date format.
  682.            Six digit dates are converted to eight digit ones by adding 2000 to
  683.            years 00-50 and 1900 to years 51-99.  Invalid date halts program.
  684.  
  685.  
  686. KEYIN%     KEYIN%                                         QB1...........FUNCTION
  687.  
  688.            KEYIN activiates an INKEY loop and then returns the ASCII decimal
  689.            value of the input key.  For two digit key codes such as ALT+KEY,
  690.            CTL+KEY, Arrow keys, PGUP, etc. the minus value of the second digit
  691.            is returned.
  692.  
  693.  
  694. KEYSET     KEYSET                                         QB1........SUB ROUTINE
  695.  
  696.            KEYSET sets function keys 1-10 to ASCII 201 to 210.
  697.  
  698.  
  699. KGRAM#     KGRAM# (P)                                     QB1...........FUNCTION
  700.  
  701.            KGRAM# returns the value of P pounds in kilograms.
  702.  
  703.  
  704. KMETER#    KMETER# (M)                                    QB1...........FUNCTION
  705.  
  706.            KMETER# returns the value of M miles in kilometers.
  707.  
  708.  
  709. LDATE$     LDATE$ (A$)                                    QB1...........FUNCTION
  710.  
  711.            LDATE converts a date in either the YYMMDD, YYYYMMDD or basic DATE$
  712.            format into a formal date in the form Mon. DD, YYYY.
  713.  
  714.  
  715. LDMENU     LDMENU (A$)                                    QB1........SUB ROUTINE
  716.  
  717.            LDMENU A$ adds the name in string A$ to the current menu when the
  718.            MENU function is being used.  A maximum of 20 entries are allowed,
  719.            and entries may be made periodically in response to program options.
  720.  
  721.  
  722. LEAPYR%    LEAPYR% (Y%)                                   QB1...........FUNCTION
  723.  
  724.            LEAPYR evaluates the year Y which must be in the YYYY format, and
  725.            returns a 1 if it is a leap year or a 0 if it is not.
  726.  
  727.  
  728. LITER#     LITER# (G)                                     QB1...........FUNCTION
  729.  
  730.            LITER# returns the value of G gallons in liters.
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737. QB1 ROUTINES & FUNCTIONS                                                      13
  738. ════════════════════════════════════════════════════════════════════════════════
  739.  
  740. LOFM%      LOFM%                                          QB1...........FUNCTION
  741.  
  742.            LOFM% returns the value of the page length or length of form set in
  743.            the PRTDEF routine.
  744.  
  745.  
  746. MENU%      MENU% (H$)                                     QB1...........FUNCTION
  747.  
  748.            MENU draws a menu on the screen with up to 20 entries, and prints
  749.            H$ across the top as the menu title.  Each entry is matched to a
  750.            letter, and MENU returns the uppercase ASCII value of the key pressed
  751.            if it is a valid selection, or if it is the ESC key.  Prior to using
  752.            the MENU function a menu must first be loaded with LDMENU.
  753.  
  754.  
  755. METER#     METER# (F)                                     QB1...........FUNCTION
  756.  
  757.            METER# returns the value of F feet in meters.
  758.  
  759.  
  760. MILES#     MILES# (KM)                                    QB1...........FUNCTION
  761.  
  762.            MILES# returns the value of KM kilometers in miles.
  763.  
  764.  
  765. MKFPATH$   MKFPATH$ (D$,F$)                               QB1...........FUNCTION
  766.  
  767.            MKFPATH$ checks D$ for a valid directory name construction and F$
  768.            for a valid file name construction.  If both are valid then MKFPATH$
  769.            returns them combined in a valid file path, otherwise it returns a
  770.            null string.  Construction only is checked, directory and file
  771.            existance are not verified.
  772.  
  773.  
  774. MLITER#    MLITER# (OZ)                                   QB1...........FUNCTION
  775.  
  776.            MLITER# returns the value of OZ fluid ounces in mililiters.
  777.  
  778.  
  779. MON$       MON$ (A$)                                      QB1...........FUNCTION
  780.  
  781.            MON evaluates a number string and returns the English version of the
  782.            month represented by the number.  For example 01 returns Jan. and 06
  783.            returns June.
  784.  
  785.  
  786. MONITOR&   MONITOR&                                       QB1...........FUNCTION
  787.  
  788.            MONITOR returns the value of the monitor offset.
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795. QB1 ROUTINES & FUNCTIONS                                                      14
  796. ════════════════════════════════════════════════════════════════════════════════
  797.  
  798. MORSE      MORSE (A$)                                     QB1........SUB ROUTINE
  799.  
  800.            MORSE returns the Morse Code sound for letter A$.  All twenty-six
  801.            English letters, digits 0-9, and standard Morse Code punctuation are
  802.            accepted.  Invalid characters return no sound.  See MORSESP
  803.  
  804.  
  805. MORSESP    MORSESP (S%)                                   QB1........SUB ROUTINE
  806.  
  807.            MORSESP S% sets the speed of the MORSE sub routine.  Valid values for
  808.            S% are 1, 2, or 3.  If MORSESP is not called MORSE defaults to 2.
  809.            On a 286 machine at 8mhz the average transmission speed was 1=12 wpm,
  810.            2=25wpm and 3=40wpm.
  811.  
  812.  
  813. MSG        MSG (M$)                                       QB1........SUB ROUTINE
  814.  
  815.            MSG takes a message M$ and prints it in reverse video in the center
  816.            of the screen for about two seconds before restoring the screen.
  817.  
  818.  
  819. NEWDATE$   NEWDATE$ (YY$,D%)                              QB1...........FUNCTION
  820.  
  821.            NEWDATE returns the new date of Y$ + or - D where Y$ is a valid date
  822.            in the YYMMDD or YYYYMMDD format and D is the number of days before
  823.            or after the date Y$.  Invalid date halts program.
  824.  
  825.  
  826. NUMASC$    NUMASC$ (F$)                                   QB1...........FUNCTION
  827.  
  828.            NUMASC$(F$) takes a string of numbers separated by spaces and
  829.            returns their ASCII character equivalents.  Thus the statement
  830.            NUMASC$("65 66") would return AB.
  831.  
  832.  
  833. NUMPAD$    NUMPAD$ (N,L%)                                 QB1...........FUNCTION
  834.  
  835.            NUMPAD returns the string value of L digits from the right of number
  836.            N.  If the length of N is less than L then N is padded with leading
  837.            zeros until it is the length of L.  Thus NUMPAD$(4,3) returns 004.
  838.  
  839.  
  840. OBF%       OBF% (F$)                                      QB1...........FUNCTION
  841.  
  842.            OBF opens file F$ in the binary mode and returns the file number.
  843.  
  844.  
  845. OZADP#     OZADP# (G)                                     QB1...........FUNCTION
  846.  
  847.            OZADP# returns the value of G grams in ounces avoirdupois.
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854. QB1 ROUTINES & FUNCTIONS                                                      15
  855. ════════════════════════════════════════════════════════════════════════════════
  856.  
  857. OZFLD#     OZFLD# (ML)                                    QB1...........FUNCTION
  858.  
  859.             OZFLD# returns the value of ML mililiters in fluid ounces.
  860.  
  861.  
  862. PADC$      PADC$ (D$,L%,C%)                               QB1...........FUNCTION
  863.  
  864.            PADC$ returns string D$ padded equally on left and right with ASCII
  865.            character C to a total string length of L.  For example the call
  866.            PADC$("exit",10,42) would return ***exit***.
  867.  
  868.  
  869. PADL$      PADL$ (D$,L%,C%)                               QB1...........FUNCTION
  870.  
  871.            PADL$ returns string D$ padded on the left with ASCII character C
  872.            to make a total string length of L.
  873.  
  874.  
  875. PADR$      PADR$ (D$,L%,C%)                               QB1...........FUNCTION
  876.  
  877.            PADR$ returns string D$ padded on the right with ASCII character C
  878.            to make a total string length of L.
  879.  
  880.  
  881. PATHCK%    PATHCK% (P$)                                   QB1...........FUNCTION
  882.  
  883.            PATHCK checks the PATH environment for directory P$.  If it is found
  884.            then a 1 is returned else a 0 is returned.
  885.  
  886.  
  887. POUND#     POUND# (KG)                                    QB1...........FUNCTION
  888.  
  889.            POUND# returns the value of KG kilograms in pounds.
  890.  
  891.  
  892. PRTCD$     PRTCD$ (N%)                                    QB1...........FUNCTION
  893.  
  894.            PRTCD$ returns the print code for the code value N when the system
  895.            has been set with PRTDEF.  Valid values for N are:
  896.  
  897.               00  -  Initialization string         10  -  Bold
  898.               01  -  Condensed print               11  -  Bold Off
  899.               02  -  Data quality 12 pitch         12  -  Underline
  900.               03  -  Letter quality 12 pitch       13  -  Underline Off
  901.               04  -  Data quality 10 pitch         14  -  Italics
  902.               05  -  Letter quqlity 10 pitch       15  -  Italics Off
  903.               06  -  Double Height                 16  -  Top Margin in lines
  904.               07  -  Double Height Off             17  -  Bottom Margin in lines
  905.               08  -  Elongate                      18  -  Left margin toggle
  906.               09  -  Elongate Off                  19  -  Page Length in Lines
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913. QB1 ROUTINES & FUNCTIONS                                                      16
  914. ════════════════════════════════════════════════════════════════════════════════
  915.  
  916. PRTDEF     PRTDEF (F$)                                    QB1........SUB ROUTINE
  917.  
  918.            PRTDEF looks for the file F$ and if it is found it reads the printer
  919.            codes from it for use by PRTCD$, and the values of top margin, bottom
  920.            margin, and page length.
  921.  
  922.  
  923. PRTSC      PRTSC                                          QB1........SUB ROUTINE
  924.  
  925.            PRTSC prints a screen dump in the manner of CTRL PRINT.
  926.  
  927.  
  928. REGH%      REGH% (VX%)                                    QB1...........FUNCTION
  929.  
  930.            REGH returns the high bit value of VX.  To find AH you would give the
  931.            command AH%=REGH%(AX%).
  932.  
  933.  
  934. REGL%      REGL% (VX%)                                    QB1...........FUNCTION
  935.  
  936.            REGL returns the low bit value of VX in the same manner that REGH
  937.            returns the high bit.
  938.  
  939. REGX%      REGX% (VH%,VL%)                                QB1...........FUNCTION
  940.  
  941.            REGX returns the full byte of the combined high and low bits, thus
  942.            you can find the value of AX by using AX%=REGX%(AH%,AL%).
  943.  
  944.  
  945. REPRT      REPRT (F%,N%,S$)                               QB1........SUB ROUTINE
  946.  
  947.            REPRT prints the string S$ N times into file number F.  F must first
  948.            be opened in either the write or append mode.
  949.  
  950.  
  951. ROMAN$     ROMAN$ (N%)                                    QB1...........FUNCTION
  952.  
  953.            ROMAN$(N) returns the roman numeral for the number N if it is less
  954.            than 10000.
  955.  
  956.  
  957. ROUND      ROUND (N,P%)                                   QB1........SUB ROUTINE
  958.  
  959.            ROUND rounds number N to decimal place P.
  960.  
  961.  
  962. RSF%       RSF% (A$)                                      QB1...........FUNCTION
  963.  
  964.            RSF(A$) opens a sequential file for reading and returns the file
  965.            number as the value of RSF.
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972. QB1 ROUTINES & FUNCTIONS                                                      17
  973. ════════════════════════════════════════════════════════════════════════════════
  974.  
  975. SCLOAD     SCLOAD (F$,S%)                                 QB1........SUB ROUTINE
  976.  
  977.            SCLOAD takes file F$ and BLOADs it at line S.
  978.  
  979.  
  980. SCOUNT%    SCOUNT% (A$,B$)                                QB1...........FUNCTION
  981.  
  982.            SCOUNT parses string A$ and returns the number of occurances of the
  983.            string B$.
  984.  
  985.  
  986. SCRNX%     SCRNX% (N%)                                    QB1...........FUNCTION
  987.  
  988.            SCRNX% returns the value of parameter N as set with the SETSCRN
  989.            command.  Parameters are:
  990.  
  991.                  1 = Top line
  992.                  2 = Bottom line
  993.                  3 = Left column
  994.                  4 = Right column
  995.  
  996.  
  997. SCROLL     SCROLL (D%,N%,A%)                              QB1........SUB ROUTINE
  998.  
  999.            SCROLL is used in programs that set the video with SETSCRN.  It moves
  1000.            N number of lines in the view port in direction D (6 up 7 down) with
  1001.            an attribute of A expressed in DOS video code.
  1002.  
  1003.  
  1004. SCSAVE     SCSAVE (F$,S%,E%)                              QB1........SUB ROUTINE
  1005.  
  1006.            SCSAVE saves a screen from line S to line E into file F$ using the
  1007.            BSAVE command.
  1008.  
  1009.  
  1010. SDATE$     SDATE$ (A$)                                    QB1...........FUNCTION
  1011.  
  1012.            SDATE converts a date in either the YYMMDD, YYYYMMDD or basic DATE$
  1013.            format into a formal date in the form Mon. DD.
  1014.  
  1015.  
  1016. SETFORM    SETFORM (F$)                                   QB1........SUB ROUTINE
  1017.  
  1018.            SETFORM reads the file F$ for up to 20 format lines to be used in
  1019.            PRINT USING statements.  These formats are placed in an array that
  1020.            is accessed by the FMT$(N) function.  All empty slots are filled with
  1021.            the & format.
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028. QB1 ROUTINES & FUNCTIONS                                                      18
  1029. ════════════════════════════════════════════════════════════════════════════════
  1030.  
  1031. SETSCRN    SETSCRN (T%,B%,L%,R%)                          QB1........SUB ROUTINE
  1032.  
  1033.            SETSCRN sets the view port from top line T to bottom line B with
  1034.            width from left column L to right column R.  In conjunction with the
  1035.            SCROLL command this enables view port control over both vertical and
  1036.            horizontal areas.  BASIC scrolling commands ignore the horizontal
  1037.            limits, so lines must be moved with SCROLL rather than PRINT.  The
  1038.            QB.LIB library must be available at link time if this routine is to
  1039.            be used as it calls routines from there.
  1040.  
  1041.  
  1042. SETW       SETW (N%)                                      QB1........SUB ROUTINE
  1043.  
  1044.            Sets the character width for Tandy DMP2100p and DMP2110 12 point
  1045.            elite and 10 point courier characters to be accessed by GETW.  Values
  1046.            for N are 12 for elite and 10 for courier.
  1047.  
  1048.  
  1049. SFM$       SFM$ (L%)                                      QB1...........FUNCTION
  1050.  
  1051.            SFM$ returns a text formating string for the PRINT USING command
  1052.            which outputs a string of L spaces in length.  If L is 0 then the
  1053.            string is formatted to variable length.
  1054.  
  1055.  
  1056. SMOD$      SMOD$ (A$,B$,C$)                               QB1...........FUNCTION
  1057.  
  1058.            SMOD$ returns the string A$ where all occurances of string B$ have
  1059.            been changed to string C$.  If C$ is null then B$ is removed from
  1060.            the string.
  1061.  
  1062.  
  1063. SORTA      SORTA (BR%,ER%,F%,A$(),BE%,EE%,FG%)            QB1........SUB ROUTINE
  1064.  
  1065.            SORTA sorts a two dimension array using the following:
  1066.  
  1067.                 BR   is the beginning record to sort
  1068.                 ER   is the ending record to sort
  1069.                 F    is the field or array element to compare in sorting
  1070.                 A$() is the array to sort.
  1071.                 BE   is the first element of affected elements
  1072.                 EE   is the last element of affected elements.
  1073.                 FG   is the display flag
  1074.  
  1075.            SORTA starts at array record BR and sorts down to record ER using
  1076.            element F as the comparison field.  When swapping data in the sort
  1077.            only array elements BE through EE are affected.  Normally BE is the
  1078.            first element in the array and EE is the last.  The display flag
  1079.            toggles a sorting countdown on the screen at whatever point you have
  1080.            positioned the cursor.  FG=0 is display off and FG=1 is display on.
  1081.            Since SORTA uses a converging two record at a time algorithm, the
  1082.            countdown is deincremented by two.
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089. QB1 ROUTINES & FUNCTIONS                                                      19
  1090. ════════════════════════════════════════════════════════════════════════════════
  1091.  
  1092. SPOT%      SPOT%                                          QB1...........FUNCTION
  1093.  
  1094.            SPOT reads the current cursor position and returns the absolute
  1095.            screen address.
  1096.  
  1097.  
  1098. SPRINT     SPRINT (R%,C%,D$)                              QB1........SUB ROUTINE
  1099.  
  1100.            SPRINT locates at R,C and prints D$.
  1101.  
  1102.  
  1103. STRCHR%    STRCHR% (S$,C$,F%,L%)                          QB1...........FUNCTION
  1104.  
  1105.            STRCHR searches string S$ for the substring C$ and returns F% as the
  1106.            first occurance of the substring, L% as the last occurance, and the
  1107.            function value as the total number of occurances.
  1108.  
  1109.  
  1110. SWAPA      SWAPA (AA$(),AB$(),RA%,RB%,BE%,EE%)            QB1........SUB ROUTINE
  1111.  
  1112.             SWAPA swaps records between two arrays where AA$() and AB$() are the
  1113.             arrays, RA is the record number in AA$(), RB is the record number in
  1114.             AB$(), BE is the beginning element to swap, and EE is the ending
  1115.             element.  Elements BE to EE must exisit in both arrays.
  1116.  
  1117. SWAPSCN    SWAPSCN (F$)                                   QB1........SUB ROUTINE
  1118.  
  1119.            SWAPSCN saves the current screen and replaces it with the binary file
  1120.            F$ using BLOAD.  The routine then waits for the ESC key to be entered
  1121.            and returns the original screen.
  1122.  
  1123.  
  1124. TIMEMATH   TIMEMATH (T$,H,NT$,D)                          QB1........SUB ROUTINE
  1125.  
  1126.            TIMEMATH takes a valid 24 hour HR:MN time string and adds H hours in
  1127.            decimal notation to it.  NT$ is the new time string returned in HR:MN
  1128.            format, and D is the number of days variation.  For example the call
  1129.            TIMEMATH "23:00",2,NT$,D would return NT$ as 01:00 and D as 1 since
  1130.            adding 2 hours to 23:00 would be 01:00 the next day.  To subtract use
  1131.            a minus H value, day variation will be returned in a negative number.
  1132.            If the new time is on the same day the D value is 0.
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139. QB1 ROUTINES & FUNCTIONS                                                      20
  1140. ════════════════════════════════════════════════════════════════════════════════
  1141.  
  1142. TITLE      TITLE (PN$,VR$,CR$,M%)                         QB1........SUB ROUTINE
  1143.  
  1144.            A$ is the program title.
  1145.            B$ is the program version number.
  1146.            C$ is the copywrite date
  1147.            A  is the toggle for Microsoft disclaimer.
  1148.  
  1149.            TITLE reads the program title and version and prints them on the
  1150.            screen in a box along with company information.  If the toggle "A"
  1151.            is set to 1 then the Microsoft runtime disclaimer is also displayed.
  1152.            Microsoft disclaimer must be used for non stand alone programs that
  1153.            utilize BRUN45.EXE to execute.  Company information is hard coded
  1154.            into the routine, so the TITLE.BAS file must be modified and
  1155.            recompiled each time company information changes.  Input strings are
  1156.            limited to 40 characters.
  1157.  
  1158.  
  1159. TMCK$      TMCK$ (D$,N%)                                  QB1...........FUNCTION
  1160.  
  1161.            TMCK$ returns D$ in HR:MN notation using a 12 hour clock if N is 12
  1162.            or a 24 hour clock if N is any other value.  Conversions can be made
  1163.            from 24 hour to 12 hour format or vice versa.  An invalid time will
  1164.            return a null string.  For example the call TMCK$("23:00",12) returns
  1165.            11:00pm while TMCK$("1:30pm",24) returns 13:00.
  1166.  
  1167.  
  1168. TOFM%      TOFM%                                          QB1...........FUNCTION
  1169.  
  1170.            TOFM returns the number of the first print line on a page.  This
  1171.            function is only valid if the printer has been defined with PRTDEF.
  1172.  
  1173.  
  1174. UPL$       UPL$ (A$)                                      QB1...........FUNCTION
  1175.  
  1176.            A$ is a string.  UPL converts the first letter of every word in the
  1177.            string to an uppercase letter and returns the converted string.
  1178.  
  1179.  
  1180. VPNAM%     VPNAM% (N$)                                    QB1...........FUNCTION
  1181.  
  1182.            VPNAM checks N$ for a valid path or file name and returns a 1 if
  1183.            valid and 0 if invalid.  VPNAM does not check existance, and removes
  1184.            a trailing \ if it is not the root directory.
  1185.  
  1186.  
  1187. WDNAM$     WDNAM$ (A%)                                    QB1...........FUNCTION
  1188.  
  1189.            WDNAM returns the full English name of a week day based on its day
  1190.            number.  For example WDNAM$(1) returns Sunday.
  1191.  
  1192.  
  1193. WDNUM%     WDNUM% (A$)                                    QB1...........FUNCTION
  1194.  
  1195.            WDNUM returns the day number of a day name in the reverse of WDNAM.
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202. QB1 ROUTINES & FUNCTIONS                                                      21
  1203. ════════════════════════════════════════════════════════════════════════════════
  1204.  
  1205. WKDAY%     WKDAY% (Y$)                                    QB1...........FUNCTION
  1206.  
  1207.            WKDAY returns the number of the day of the week represented by the
  1208.            date Y$ where Y$ is either a valid YYMMDD or YYYYMMDD format date.
  1209.            Invalid date halts program.
  1210.  
  1211.  
  1212. WRTFDAT    WRTFDAT (F$,D$(),BR%,BE%,EE%,TR%)              QB1........SUB ROUTINE
  1213.  
  1214.            WRTFDAT opens file F$ and writes array D$() to the file starting with
  1215.            array record BR and ending with array record TR using array elements
  1216.            BE to EE.  Blank array records are skipped over.  Each array record
  1217.            is written to the file as a file record with the elements as fields
  1218.            separtated by commas in the manner of the WRITE statement.
  1219.  
  1220.  
  1221. WSF%       WSF% (A$)                                      QB1...........FUNCTION
  1222.  
  1223.            WSF(A$) opens a sequential file for writting and returns the file
  1224.            number as the value of WSF.
  1225.  
  1226.  
  1227. YESNO$     YESNO$                                         QB1...........FUNCTION
  1228.  
  1229.            YESNO enters an INKEY$ loop and waits for the input of either an
  1230.            N or Y in either case.  The input is then returned as an uppercase
  1231.            letter N or Y.
  1232.  
  1233.  
  1234. YMD$       YMD$ (A$,P$)                                   QB1...........FUNCTION
  1235.  
  1236.            YMD converts an English date Month xx, xxx into a YYMMDD format date.
  1237.            Month can be either spelled out or three letter abreveiation.
  1238.  
  1239.  
  1240. YRCK$      YRCK$ (D$)                                     QB1...........FUNCTION
  1241.  
  1242.            YRCK evaluates a YYMMDD or YYYYMMDD date and returns a YYYYMMDD
  1243.            string if it finds a valid date.  If the date is invalid then the
  1244.            string "ERROR" is returned.  Six digit dates with years less than
  1245.            51 are converted to century 20 while dates 51 to 99 are converted
  1246.            to century 19.
  1247.  
  1248.  
  1249. YYMMDD$    YYMMDD$ (P$)                                   QB1...........FUNCTION
  1250.  
  1251.            YYMMDD$ returns the YYMMDD format of the current Basic DATE$, and
  1252.            P$ is the separator to use between elements. Thus for the date
  1253.            01-10-1991 YYMMDD$("") returns 910110, YYMMDD$(".") returns 91.01.10
  1254.            and YYMMDD$("-") returns 91-01-10, etc.
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260. QB1 ROUTINES & FUNCTIONS  -  Table of Contents                                 i
  1261. ════════════════════════════════════════════════════════════════════════════════
  1262.  
  1263. ANAM$               . . . . .    QB1...........FUNCTION         . . . . .      1
  1264. ARG$                . . . . .    QB1...........FUNCTION         . . . . .      1
  1265. ARGS%               . . . . .    QB1...........FUNCTION         . . . . .      1
  1266. ARKEY               . . . . .    QB1........SUB ROUTINE         . . . . .      1
  1267. ASCII               . . . . .    QB1........SUB ROUTINE         . . . . .      1
  1268. ASCNUM$             . . . . .    QB1...........FUNCTION         . . . . .      1
  1269. ASF%                . . . . .    QB1...........FUNCTION         . . . . .      1
  1270. BKEY                . . . . .    QB1........SUB ROUTINE         . . . . .      1
  1271. BOFM%               . . . . .    QB1...........FUNCTION         . . . . .      2
  1272. BOXC                . . . . .    QB1........SUB ROUTINE         . . . . .      2
  1273. BOXO                . . . . .    QB1........SUB ROUTINE         . . . . .      2
  1274. CCNV$               . . . . .    QB1...........FUNCTION         . . . . .      2
  1275. CDIR$               . . . . .    QB1...........FUNCTION         . . . . .      2
  1276. CDRV%               . . . . .    QB1...........FUNCTION         . . . . .      2
  1277. CELSIUS#            . . . . .    QB1...........FUNCTION         . . . . .      2
  1278. CENTER%             . . . . .    QB1...........FUNCTION         . . . . .      2
  1279. CHDRV%              . . . . .    QB1...........FUNCTION         . . . . .      3
  1280. CKDIR%              . . . . .    QB1...........FUNCTION         . . . . .      3
  1281. CKDRV%              . . . . .    QB1...........FUNCTION         . . . . .      3
  1282. CKFILE              . . . . .    QB1........SUB ROUTINE         . . . . .      3
  1283. CLEAN$              . . . . .    QB1...........FUNCTION         . . . . .      3
  1284. CLKTIME$            . . . . .    QB1...........FUNCTION         . . . . .      3
  1285. CLMENU              . . . . .    QB1........SUB ROUTINE         . . . . .      3
  1286. CMETER#             . . . . .    QB1...........FUNCTION         . . . . .      3
  1287. CMON$               . . . . .    QB1...........FUNCTION         . . . . .      3
  1288. CMOV                . . . . .    QB1........SUB ROUTINE         . . . . .      4
  1289. COLBG%              . . . . .    QB1...........FUNCTION         . . . . .      4
  1290. COLFG%              . . . . .    QB1...........FUNCTION         . . . . .      4
  1291. COLORATB            . . . . .    QB1...........FUNCTION         . . . . .      4
  1292. COLORBAS            . . . . .    QB1........SUB ROUTINE         . . . . .      4
  1293. COLORCFG            . . . . .    QB1........SUB ROUTINE         . . . . .      4
  1294. COLORINT            . . . . .    QB1........SUB ROUTINE         . . . . .      4
  1295. COLORMAP            . . . . .    QB1........SUB ROUTINE         . . . . .      5
  1296. COLORSET            . . . . .    QB1........SUB ROUTINE         . . . . .      5
  1297. COLPR               . . . . .    QB1........SUB ROUTINE         . . . . .      5
  1298. CONCAT$             . . . . .    QB1...........FUNCTION         . . . . .      5
  1299. COORD               . . . . .    QB1........SUB ROUTINE         . . . . .      5
  1300. COPY                . . . . .    QB1........SUB ROUTINE         . . . . .      5
  1301. CPRINT              . . . . .    QB1........SUB ROUTINE         . . . . .      5
  1302. CURZ                . . . . .    QB1........SUB ROUTINE         . . . . .      5
  1303. CVBASE              . . . . .    QB1........SUB ROUTINE         . . . . .      5
  1304. D2B                 . . . . .    QB1........SUB ROUTINE         . . . . .      6
  1305. DATERR              . . . . .    QB1........SUB ROUTINE         . . . . .      6
  1306. DAYNUM%             . . . . .    QB1...........FUNCTION         . . . . .      6
  1307. DECTIME             . . . . .    QB1...........FUNCTION         . . . . .      6
  1308. DEFPRT              . . . . .    QB1........SUB ROUTINE         . . . . .      6
  1309. DELIN               . . . . .    QB1........SUB ROUTINE         . . . . .      6
  1310. DNUM#               . . . . .    QB1...........FUNCTION         . . . . .      7
  1311. DRIVE$              . . . . .    QB1...........FUNCTION         . . . . .      7
  1312. DRIVN%              . . . . .    QB1...........FUNCTION         . . . . .      7
  1313. DSUM                . . . . .    QB1........SUB ROUTINE         . . . . .      7
  1314. DVDR%               . . . . .    QB1...........FUNCTION         . . . . .      7
  1315. EDCK%               . . . . .    QB1...........FUNCTION         . . . . .      7
  1316. ENVCL               . . . . .    QB1........SUB ROUTINE         . . . . .      8
  1317. ENVFR%              . . . . .    QB1...........FUNCTION         . . . . .      8
  1318.  
  1319.  
  1320.  
  1321.  
  1322. QB1 ROUTINES & FUNCTIONS  -  Table of Contents                                ii
  1323. ════════════════════════════════════════════════════════════════════════════════
  1324.  
  1325. ENVSET%             . . . . .    QB1...........FUNCTION         . . . . .      8
  1326. EXINT               . . . . .    QB1........SUB ROUTINE         . . . . .      8
  1327. EXIST%              . . . . .    QB1...........FUNCTION         . . . . .      8
  1328. FAHREN#             . . . . .    QB1...........FUNCTION         . . . . .      8
  1329. FED$                . . . . .    QB1...........FUNCTION         . . . . .      9
  1330. FEET#               . . . . .    QB1...........FUNCTION         . . . . .      9
  1331. FILOC$              . . . . .    QB1...........FUNCTION         . . . . .      9
  1332. FIN                 . . . . .    QB1........SUB ROUTINE         . . . . .      9
  1333. FLIST%              . . . . .    QB1...........FUNCTION         . . . . .      9
  1334. FLST$               . . . . .    QB1...........FUNCTION         . . . . .      9
  1335. FMT$                . . . . .    QB1...........FUNCTION         . . . . .     10
  1336. GALLON#             . . . . .    QB1...........FUNCTION         . . . . .     10
  1337. GETCOL              . . . . .    QB1........SUB ROUTINE         . . . . .     10
  1338. GETFDAT             . . . . .    QB1........SUB ROUTINE         . . . . .     10
  1339. GETW%               . . . . .    QB1...........FUNCTION         . . . . .     10
  1340. GRAM#               . . . . .    QB1...........FUNCTION         . . . . .     10
  1341. HMOVE               . . . . .    QB1........SUB ROUTINE         . . . . .     10
  1342. HOURS               . . . . .    QB1...........FUNCTION         . . . . .     11
  1343. INCH#               . . . . .    QB1...........FUNCTION         . . . . .     11
  1344. INCODE%             . . . . .    QB1...........FUNCTION         . . . . .     11
  1345. INFLD%              . . . . .    QB1...........FUNCTION         . . . . .     11
  1346. INLINE$             . . . . .    QB1...........FUNCTION         . . . . .     11
  1347. JULCV$              . . . . .    QB1...........FUNCTION         . . . . .     11
  1348. JULIAN%             . . . . .    QB1...........FUNCTION         . . . . .     12
  1349. KEYIN%              . . . . .    QB1...........FUNCTION         . . . . .     12
  1350. KEYSET              . . . . .    QB1........SUB ROUTINE         . . . . .     12
  1351. KGRAM#              . . . . .    QB1...........FUNCTION         . . . . .     12
  1352. KMETER#             . . . . .    QB1...........FUNCTION         . . . . .     12
  1353. LDATE$              . . . . .    QB1...........FUNCTION         . . . . .     12
  1354. LDMENU              . . . . .    QB1........SUB ROUTINE         . . . . .     12
  1355. LEAPYR%             . . . . .    QB1...........FUNCTION         . . . . .     12
  1356. LITER#              . . . . .    QB1...........FUNCTION         . . . . .     12
  1357. LOFM%               . . . . .    QB1...........FUNCTION         . . . . .     13
  1358. MENU%               . . . . .    QB1...........FUNCTION         . . . . .     13
  1359. METER#              . . . . .    QB1...........FUNCTION         . . . . .     13
  1360. MILES#              . . . . .    QB1...........FUNCTION         . . . . .     13
  1361. MKFPATH$            . . . . .    QB1...........FUNCTION         . . . . .     13
  1362. MLITER#             . . . . .    QB1...........FUNCTION         . . . . .     13
  1363. MON$                . . . . .    QB1...........FUNCTION         . . . . .     13
  1364. MONITOR&            . . . . .    QB1...........FUNCTION         . . . . .     13
  1365. MORSE               . . . . .    QB1........SUB ROUTINE         . . . . .     14
  1366. MORSESP             . . . . .    QB1........SUB ROUTINE         . . . . .     14
  1367. MSG                 . . . . .    QB1........SUB ROUTINE         . . . . .     14
  1368. NEWDATE$            . . . . .    QB1...........FUNCTION         . . . . .     14
  1369. NUMASC$             . . . . .    QB1...........FUNCTION         . . . . .     14
  1370. NUMPAD$             . . . . .    QB1...........FUNCTION         . . . . .     14
  1371. OBF%                . . . . .    QB1...........FUNCTION         . . . . .     14
  1372. OZADP#              . . . . .    QB1...........FUNCTION         . . . . .     14
  1373. OZFLD#              . . . . .    QB1...........FUNCTION         . . . . .     15
  1374. PADC$               . . . . .    QB1...........FUNCTION         . . . . .     15
  1375. PADL$               . . . . .    QB1...........FUNCTION         . . . . .     15
  1376. PADR$               . . . . .    QB1...........FUNCTION         . . . . .     15
  1377. PATHCK%             . . . . .    QB1...........FUNCTION         . . . . .     15
  1378. POUND#              . . . . .    QB1...........FUNCTION         . . . . .     15
  1379. PRTCD$              . . . . .    QB1...........FUNCTION         . . . . .     15
  1380.  
  1381.  
  1382.  
  1383.  
  1384. QB1 ROUTINES & FUNCTIONS  -  Table of Contents                               iii
  1385. ════════════════════════════════════════════════════════════════════════════════
  1386.  
  1387. PRTDEF              . . . . .    QB1........SUB ROUTINE         . . . . .     16
  1388. PRTSC               . . . . .    QB1........SUB ROUTINE         . . . . .     16
  1389. REGH%               . . . . .    QB1...........FUNCTION         . . . . .     16
  1390. REGL%               . . . . .    QB1...........FUNCTION         . . . . .     16
  1391. REGX%               . . . . .    QB1...........FUNCTION         . . . . .     16
  1392. REPRT               . . . . .    QB1........SUB ROUTINE         . . . . .     16
  1393. ROMAN$              . . . . .    QB1...........FUNCTION         . . . . .     16
  1394. ROUND               . . . . .    QB1........SUB ROUTINE         . . . . .     16
  1395. RSF%                . . . . .    QB1...........FUNCTION         . . . . .     16
  1396. SCLOAD              . . . . .    QB1........SUB ROUTINE         . . . . .     17
  1397. SCOUNT%             . . . . .    QB1...........FUNCTION         . . . . .     17
  1398. SCRNX%              . . . . .    QB1...........FUNCTION         . . . . .     17
  1399. SCROLL              . . . . .    QB1........SUB ROUTINE         . . . . .     17
  1400. SCSAVE              . . . . .    QB1........SUB ROUTINE         . . . . .     17
  1401. SDATE$              . . . . .    QB1...........FUNCTION         . . . . .     17
  1402. SETFORM             . . . . .    QB1........SUB ROUTINE         . . . . .     17
  1403. SETSCRN             . . . . .    QB1........SUB ROUTINE         . . . . .     18
  1404. SETW                . . . . .    QB1........SUB ROUTINE         . . . . .     18
  1405. SFM$                . . . . .    QB1...........FUNCTION         . . . . .     18
  1406. SMOD$               . . . . .    QB1...........FUNCTION         . . . . .     18
  1407. SORTA               . . . . .    QB1........SUB ROUTINE         . . . . .     18
  1408. SPOT%               . . . . .    QB1...........FUNCTION         . . . . .     19
  1409. SPRINT              . . . . .    QB1........SUB ROUTINE         . . . . .     19
  1410. STRCHR%             . . . . .    QB1...........FUNCTION         . . . . .     19
  1411. SWAPA               . . . . .    QB1........SUB ROUTINE         . . . . .     19
  1412. SWAPSCN             . . . . .    QB1........SUB ROUTINE         . . . . .     19
  1413. TIMEMATH            . . . . .    QB1........SUB ROUTINE         . . . . .     19
  1414. TITLE               . . . . .    QB1........SUB ROUTINE         . . . . .     20
  1415. TMCK$               . . . . .    QB1...........FUNCTION         . . . . .     20
  1416. TOFM%               . . . . .    QB1...........FUNCTION         . . . . .     20
  1417. UPL$                . . . . .    QB1...........FUNCTION         . . . . .     20
  1418. VPNAM%              . . . . .    QB1...........FUNCTION         . . . . .     20
  1419. WDNAM$              . . . . .    QB1...........FUNCTION         . . . . .     20
  1420. WDNUM%              . . . . .    QB1...........FUNCTION         . . . . .     20
  1421. WKDAY%              . . . . .    QB1...........FUNCTION         . . . . .     21
  1422. WRTFDAT             . . . . .    QB1........SUB ROUTINE         . . . . .     21
  1423. WSF%                . . . . .    QB1...........FUNCTION         . . . . .     21
  1424. YESNO$              . . . . .    QB1...........FUNCTION         . . . . .     21
  1425. YMD$                . . . . .    QB1...........FUNCTION         . . . . .     21
  1426. YRCK$               . . . . .    QB1...........FUNCTION         . . . . .     21
  1427. YYMMDD$             . . . . .    QB1...........FUNCTION         . . . . .     21
  1428.  
  1429.