home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / basicref.zip / BASICREF.DOC next >
Text File  |  1987-01-15  |  87KB  |  2,178 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                  BASICREF
  10.  
  11.                BASIC CROSS REFERENCE UTILITY       Version 1.05
  12.                (C)Copyright Excelsior Software, Inc. 1985, 1986
  13.                             All Rights Reserved
  14.  
  15.  
  16.  
  17.  
  18.                         A "User Supported" Program
  19.  
  20.  
  21.  
  22.  
  23.                      A PROGRAMMING AID FOR THE IBM PC
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.                           EXCELSIOR SOFTWARE, INC.
  32.                                P. O. BOX 226
  33.                            NEW MILFORD, NJ 07646
  34.                                (201) 384-1848
  35.  
  36.  
  37.  
  38.  
  39.  
  40.   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  41.   .                                                                 .
  42.   .   This User's Manual has been generated from the documentation  .
  43.   .   file    BASICREF.DOC    on the diskette supplied with the     .
  44.   .   BASIC Cross Reference Utility.  A copy of this User's Manual  .
  45.   .   may be produced on your line printer under DOS (when the      .
  46.   .   prompt   A>   appears) from the program diskette by entering  .
  47.   .   the command:      COPY BASICREF.DOC LPT1:     .  A listing    .
  48.   .   of this User's Manual may also be produced on the screen      .
  49.   .   under DOS by entering the command:     TYPE BASICREF.DOC      .
  50.   .                                                                 .
  51.   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.                          NOTES ON BASICREF VERSIONS
  68.  
  69.  
  70.       SPECIAL NOTE ON ALL BASICREF VERSIONS:  BASICREF does not recog-
  71.       nize path filenames, since the backslash character will be inter-
  72.       preted as a delimiter preceding program option characters.
  73.       Therefore, all files referenced by BASICREF should reside in the
  74.       root directory.  Sub-directories will be treated in the future.
  75.  
  76.  
  77.       Version 1.05 of BASICREF incorporates correction of all known
  78.       program bugs as of October 1986.
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                                   i
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.                                 FOREWORD
  139.  
  140.  
  141.  
  142.        This disk contains BASICREF, our BASIC Cross Reference Utility
  143.        program.  We invite you to use the program and copy it freely
  144.        for your friends, acquaintances and co-workers so that they may
  145.        try it too and, hopefully, pass it on to others.
  146.  
  147.        If you like this program, and find it useful, we request you
  148.        send a ten dollar contribution to further the "User Supported"
  149.        concept under which this program is made available.  In return,
  150.        we'll keep you informed of any corrections we make to program
  151.        bugs that we become aware of.
  152.  
  153.        On page 26 of this documentation you will find a description
  154.        of an enhanced version of the program.  Please take the time
  155.        to read it.  If you like this version of the program, we think
  156.        you will like the enhanced version even more so.  The enhanced
  157.        version is priced at the nominal sum of twenty five dollars
  158.        (thirty five if you haven't yet made a ten dollar contribution
  159.        for the standard version of the program).  If you do order the
  160.        enhanced version, you will get:
  161.  
  162.          1. A disk containing the enhanced program and accompanying
  163.             documentation.
  164.          2. Updates, corrections, modifications, etc. to the program
  165.             any time after purchase at nominal cost.
  166.          3. Free consultation by mail or phone on any aspect
  167.             of the program.
  168.  
  169.       Take the time to read the description of the enhanced version
  170.       of BASICREF and, if you are interested, you will find an
  171.       order form on page 29 for your convenience.  If you try it,
  172.       we think you'll be quite pleased.
  173.  
  174.       We are also contemplating rewriting BASICREF for the Microsoft
  175.       QuickBASIC compiler.  We would like to know how much interest
  176.       there would be in such a product, and we would appreciate
  177.       hearing from anyone who would be inclined to purchase it if
  178.       if were available.  The order form includes a space for
  179.       indicating interest in a cross reference utility for Microsoft
  180.       QuickBASIC.  There's no obligation, of course, but it would
  181.       help in our deciding whether to go ahead with the effort.
  182.  
  183.       In any event, we would like to hear from you regardless of
  184.       whether or not you make a contribution or a purchase.  Let
  185.       us know what you like or dislike about the program, what you
  186.       would like to see added or changed, and any other suggestions
  187.       you might care to make or comments you have to offer.  You
  188.       can reach us at Excelsior Software, Inc., Box 226, New Milford,
  189.       NJ 07646.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                 ii
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                         TABLE OF CONTENTS
  203.  
  204.  
  205.        NOTES ON BASICREF VERSIONS . . . . . . . . . . . . . .  i
  206.  
  207.        FOREWORD . . . . . . . . . . . . . . . . . . . . . . . ii
  208.  
  209.        INTRODUCTION . . . . . . . . . . . . . . . . . . . . .  1
  210.  
  211.        PROGRAM OPERATION SUMMARY  . . . . . . . . . . . . . .  2
  212.  
  213.        SYSTEM REQUIREMENTS  . . . . . . . . . . . . . . . . .  3
  214.  
  215.        DISK PREPARATION . . . . . . . . . . . . . . . . . . .  3
  216.  
  217.        PRELIMINARY PREPARATION  . . . . . . . . . . . . . . .  3
  218.          BASIC Source Program . . . . . . . . . . . . . . . .  3
  219.          Cross Reference File . . . . . . . . . . . . . . . .  4
  220.          Cross Reference Program Disk . . . . . . . . . . . .  5
  221.          Temporary Data File  . . . . . . . . . . . . . . . .  6
  222.  
  223.        RUNNING THE CROSS REFERENCE PROGRAM  . . . . . . . . .  6
  224.          Program Loading and Initiation . . . . . . . . . . .  6
  225.          Selection of Choice of Action  . . . . . . . . . . .  6
  226.          Specification of BASIC Program File Name . . . . . .  7
  227.          Input File Options . . . . . . . . . . . . . . . . .  8
  228.          BASIC Version  . . . . . . . . . . . . . . . . . . .  8
  229.          Statement Numbers  . . . . . . . . . . . . . . . . .  9
  230.          BASIC Program Listing  . . . . . . . . . . . . . . . 10
  231.          Example of Input File Option Specification . . . . . 10
  232.          Specification of Cross Reference File Name . . . . . 10
  233.          Cross Reference Printout Options . . . . . . . . . . 12
  234.          Example of Cross Reference File Specification  . . . 13
  235.  
  236.        PROGRAM OPERATION FOR EACH ACTION SELECTED . . . . . . 13
  237.          F1 - Processing of BASIC Source Program  . . . . . . 13
  238.          F2 - Printout of BASIC Source Program  . . . . . . . 15
  239.          F3 - List Cross Reference Output on the Screen . . . 17
  240.          F4 - List Cross Reference Output on the Printer  . . 17
  241.            Statement Number References  . . . . . . . . . . . 18
  242.            Reserved Word References . . . . . . . . . . . . . 20
  243.            Program Variable References  . . . . . . . . . . . 20
  244.            I/O Related Variable References  . . . . . . . . . 21
  245.  
  246.        COMMENTS REGARDING COMPILED BASIC PROGRAMS . . . . . . 22
  247.  
  248.        SOME FINAL WORDS . . . . . . . . . . . . . . . . . . . 26
  249.  
  250.        ENHANCED CROSS REFERENCE UTILITY . . . . . . . . . . . 26
  251.  
  252.        DISCLAIMER . . . . . . . . . . . . . . . . . . . . . . 28
  253.  
  254.        PROGRAM ORDER FORM . . . . . . . . . . . . . . . . . . 29
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                                    iii
  261.  
  262.  
  263.  
  264.  
  265.  
  266.                                 INTRODUCTION
  267.  
  268.  
  269.        The BASIC CROSS REFERENCE UTILITY is a programming aid for the
  270.        serious programmer using the BASIC language on the IBM PC.
  271.        Its use will facilitate the programming and debugging of
  272.        BASIC source language programs.
  273.  
  274.        The utility provides the following output listings...
  275.  
  276.          1. A complete listing of all program line numbers, showing
  277.             all references by other statements in the program.  Any
  278.             references to non-existent line numbers are given, as
  279.             well as any references to invalid line numbers.
  280.          2. An alphabetic listing of all reserved words showing the
  281.             line numbers in which they appear.  Reserved words are
  282.             combined when the result provides greater significance
  283.             than the individual words would provide as, for example,
  284.             in  LINE INPUT  ,  ON ERROR  , or  PRINT USING  .
  285.          3. An alphabetic listing of all program variables showing
  286.             the line numbers in which they appear.  Array variables
  287.             are shown with their dimensions as defined in the  DIM
  288.             statement.  For a variable whose type differs from its
  289.             default value, as a result of a  DEFtype  statement, the
  290.             variable type is shown.
  291.          4. An alphabetic listing of all I/O related variables that
  292.             are neither reserved words nor program variables.  This
  293.             includes file names, device names, and descriptors or
  294.             delimiters found in I/O statements, such as   APPEND
  295.             or   OUTPUT   .
  296.          5. A listing of the BASIC source program may be produced,
  297.             with top and bottom page margins, page headings, and
  298.             formatting of program statements for improvement in
  299.             program readability.
  300.  
  301.        Major features of the Cross Reference Utility include...
  302.  
  303.          1. The BASIC source program may include both numbered and
  304.             un-numbered statements.  The latter is of particular
  305.             significance in processing programs to be run under
  306.             compiled BASIC.
  307.          2. The BASIC program may be processed as either BASIC
  308.             Version 1.1, 2.0 or 3.0, for proper differentiation
  309.             between reserved words and program variables in each
  310.             version.
  311.          3. Cross reference output is stored on a disk file, for
  312.             listing to the screen and/or printer when desired.  On
  313.             listing, selected report sections may be suppressed.
  314.          4. Last, but certainly not least, this utility will produce
  315.             a cross reference listing for any size BASIC program,
  316.             without exception.  Therefore, your program is limited
  317.             only by restrictions of the BASIC system and the BASIC
  318.             interpreter or compiler, and not by our utility.
  319.  
  320.  
  321.  
  322.  
  323.                                    1
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.                         PROGRAM OPERATION SUMMARY
  331.  
  332.        The material on this page cuts through all the chaff and gives
  333.        the very basic information needed to run the Cross Reference
  334.        Utility.  This page will get you started; succeeding pages will
  335.        provide more detail and may be read at your leisure.
  336.  
  337.        Your BASIC source program should be saved in ASCII format prior
  338.        to loading the Cross Reference Utility.
  339.  
  340.        The program is loaded and executed under DOS (prompt A> on the
  341.        screen) by typing   BASICREF   and pressing the Enter key.
  342.  
  343.        Select the actions desired when the main menu is displayed,
  344.        using function keys F1 through F4 as toggle switches to
  345.        activate or deactivate the selections.  Depress function
  346.        key F10 when desired selections have been established, to
  347.        start processing.
  348.  
  349.        Respond with BASIC source program input file name and/or
  350.        cross reference output file name when prompted by the
  351.        program.  Desired options may be selected by immediately
  352.        following the file name with a   /   or   \   , followed
  353.        by appropriate one-character option codes, as follows:
  354.  
  355.          BASIC Source Program Input File
  356.            1 - Reserved word assignments correspond only to
  357.                BASIC version 1.1
  358.            3 - Reserved word assignments correspond to BASIC
  359.                version 3.0
  360.              - Default (neither 1 nor 3) corresponds to BASIC
  361.                version 2.0 reserved word assignments
  362.            N - Statement numbers in BASIC statements are optional
  363.            S - Suppress formatting of BASIC statements in
  364.                printout of BASIC source program.
  365.  
  366.          Cross Reference Output File
  367.            S - Suppress printout of statement number references
  368.            R - Suppress printout of reserved word references
  369.            V - Suppress printout of program variable references
  370.            I - Suppress printout of I/O related variable references
  371.  
  372.        Processing will start following specification of input and/or
  373.        output file names.  Actions selected will be executed in
  374.        numerical order corresponding to the function key numbers
  375.        selected in the main menu.  Processing may be terminated at any
  376.        time by depressing the F10 key to return to the main menu.
  377.  
  378.        A cross reference output file may be listed in the run in which
  379.        it was generated, or in a subsequent run.  Options to suppress
  380.        sections of the printout may be changed from one listing to
  381.        the next.  Generated cross reference output files will remain
  382.        on the disk until deleted or replaced by another file with the
  383.        same name.
  384.  
  385.        Contents of the cross reference output listings, as well as
  386.        details on the material presented above, are discussed in the
  387.        pages that follow.
  388.  
  389.                                 2
  390.  
  391.  
  392.  
  393.  
  394.  
  395.                             SYSTEM REQUIREMENTS
  396.  
  397.  
  398.        The Cross Reference Utility is a programming aid for programs
  399.        run on the IBM PC or compatibles under interpreter or compiler
  400.        BASIC.  The minimum system configuration required is:
  401.  
  402.                      128K RAM
  403.                      One Disk Drive
  404.                      Monochrome or Color Monitor
  405.                      Printer (Optional)
  406.  
  407.        This standard version of BASICREF runs under PC DOS versions
  408.        1.1 and later.  The disk supplied has been formatted and
  409.        written under DOS 2.1 as a double sided disk.
  410.  
  411.        The Cross Reference Utility is written in BASIC, and runs
  412.        as a compiled program.  Your DOS system is the only addi-
  413.        tional software required to run the program.
  414.  
  415.  
  416.  
  417.                              DISK PREPARATION
  418.  
  419.  
  420.        Before you proceed, it is strongly recommended that you make one
  421.        or more copies of the diskette for backup purposes.  This can be
  422.        done under DOS using the DISKCOPY command to copy the complete
  423.        contents of the diskette, followed by the DISKCOMP command to
  424.        verify that the source and duplicate diskettes are identical.
  425.  
  426.        The programs can be copied individually from a disk in drive A
  427.        onto a formatted blank diskette in drive B with the commands:
  428.  
  429.           COPY BASICREF.EXE B:/V      COPY BASICRF1.EXE B:/V
  430.           COPY BASICREF.DOC B:/V      COPY TESTPROG.BAS B:/V
  431.  
  432.        Programs  BASICREF.EXE  and  BASICRF1.EXE  are necessary to
  433.        execute BASICREF;  BASICREF.DOC  is this documentation file;
  434.        TESTPROG.BAS  is a sample BASIC program.
  435.  
  436.        Once the disk contents have been copied successfully the
  437.        original disk should be stored in a safe place.
  438.  
  439.  
  440.  
  441.                           PRELIMINARY PREPARATION
  442.  
  443.  
  444.          BASIC Source Program
  445.  
  446.        The BASIC program to be processed by the Cross Reference
  447.        Utility must be stored in ASCII format.  For a BASIC program
  448.        run under interpreter BASIC, the program may be stored on disk
  449.        when in memory under BASICA by entering the command ...
  450.                          SAVE filespec,A
  451.        where   filespec   is a string expression for the file speci-
  452.        fication.  Note that if the    ,A    option is omitted, the
  453.        program will be saved in a tokenized binary format, which
  454.        will not be acceptable to the Cross Reference Utility.
  455.  
  456.  
  457.                                 3
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.        A BASIC program file generated through the use of the DOS Line
  465.        Editor (EDLIN) program will also be in ASCII format and may be
  466.        processed by the Cross Reference Utility.  This will be of
  467.        particular value in the development of programs to be run
  468.        under the BASIC compiler, where the use of line numbers is
  469.        optional.  (More about this later).
  470.  
  471.  
  472.  
  473.  
  474.           Cross Reference File
  475.  
  476.        When a BASIC program is processed by the Cross Reference
  477.        Utility, a disk file is generated containing the information
  478.        necessary to produce subsequent cross reference listings.
  479.        This cross reference file will be stored on whichever disk
  480.        drive the user specifies, and sufficient space must exist on
  481.        the selected disk to store the cross reference file.
  482.  
  483.        The exact size of a cross reference file is dependent upon the
  484.        size and complexity of the specific BASIC program being
  485.        referenced and cannot be easily determined in advance.
  486.        However, as a general rule of thumb, the cross reference file
  487.        will be less than half the length of the BASIC source program
  488.        file, and that criteria can be used to determine if there is
  489.        sufficient space on the selected disk to store the cross
  490.        reference file that will be generated.
  491.  
  492.        If you do not know whether there is sufficient space on the
  493.        disk on which you plan to store the cross reference file that
  494.        will be generated, you should proceed as follows:
  495.  
  496.        1. Load DOS from your DOS diskette until the prompt   A>
  497.           appears.
  498.  
  499.        2. Execute the Directory (DIR) command on the disk that
  500.           contains the BASIC source file.  (See the DOS manual for
  501.           information on applying the DIR command).  The space on
  502.           the disk occupied by the BASIC source program, in bytes,
  503.           will be shown on the line next to the BASIC program file
  504.           name.
  505.  
  506.           Assume for example, that the program to be processed by
  507.           the Cross Reference Utility is stored on a disk with a
  508.           file name of   TESTFILE.BAS  .  Assume that a portion of
  509.           the listing produced by the DIR command shows...
  510.  
  511.                  FILE1    BAS   12800    8-07-84    9:56a
  512.                  FILE2           3200    1-11-80   10:04p
  513.                  TESTFILE BAS   25600    2-03-83    4:13p
  514.                  PROG     EXE   12612    9-04-83   12:12p
  515.  
  516.           In this case, program    TESTFILE.BAS    occupies 25600
  517.           bytes on the disk, and half this amount, approximately,
  518.           or at least 12800 bytes must be available on the disk on
  519.           which the cross reference file will be stored.
  520.  
  521.  
  522.  
  523.                                   4
  524.  
  525.  
  526.  
  527.  
  528.  
  529.        3. To determine how much space is available on the disk on
  530.           which the cross reference file will be stored, execute
  531.           the Check Disk (CHKDSK) command for the selected disk.
  532.           (See the DOS manual for information on applying the
  533.           CHKDSK command).  The status report produced will show
  534.           how much free space is available on the disk.
  535.  
  536.           Assume, for example, that execution of the CHKDSK command
  537.           produces the following report...
  538.  
  539.                    322560 bytes total disk space
  540.                      9216 bytes in 2 hidden files
  541.                    204800 bytes in 49 user files
  542.                    108544 bytes available on disk
  543.  
  544.                    262144 bytes total memory
  545.                    29744 bytes free
  546.  
  547.           In this case, there are 108544 bytes of unused space
  548.           available on the disk, far in excess of the 12800 bytes
  549.           required, and this disk can be used to store the cross
  550.           reference file with room to spare.
  551.  
  552.        Should CHKDSK indicate insufficient space on the selected
  553.        disk, repeat step 3 above until a disk with sufficient
  554.        space is found.
  555.  
  556.        As will be discussed later, the only limitation on the size
  557.        of the BASIC program that can be processed by the Cross
  558.        Reference Utility is the disk space available to store the
  559.        cross reference output file.  Therefore, it is possible to
  560.        process a BASIC program that is too large to run under the
  561.        BASIC interpreter, or too complex to be compiled by the BASIC
  562.        compiler.  Consequently, it should be kept in mind that the
  563.        successful processing of a BASIC program by the Cross
  564.        Reference Utility does not necessarily mean that the program
  565.        will be executionable.
  566.  
  567.  
  568.  
  569.           Cross Reference Program Disk
  570.  
  571.        The disk containing the Cross Reference Utility programs should
  572.        be inserted in the default drive.  For a two disk drive system,
  573.        it is immaterial in which drive the disks containing the BASIC
  574.        program file and the cross reference file are located.
  575.  
  576.        For a single disk drive system, the cross reference programs,
  577.        the BASIC program file, and the cross reference file should
  578.        all reside on the same disk, for most efficient processing.
  579.        If not, it may be necessary to change disks from time to time,
  580.        as processing proceeds.
  581.  
  582.        If this situation does occur, the program will prompt for the
  583.        proper file, as required.  While results will be correct,
  584.        processing will be inefficient, and this mode of operation is
  585.        not recommended.  Therefore, once again, you should see to it
  586.        that all required files, including the Cross Reference Utility
  587.        programs, reside on the same disk if you are using a system
  588.        with a single disk drive.
  589.  
  590.                                      5
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.           Temporary Data File
  598.  
  599.        The Cross Reference Utility is comprised of the two programs
  600.        BASICREF.EXE   and   BASICRF1.EXE  .  During the course of
  601.        execution of the programs, each program may chain the other.
  602.        Because of the compiler options used to generate the  .EXE
  603.        modules, data cannot be passed between programs through the
  604.        use of  COMMON  statements.  Therefore, a temporary data file
  605.        is used during the chaining of programs to pass data from one
  606.        program to the other.  This data file, named   BA$ICREF.101  ,
  607.        requires about 128 bytes, and only exists while a  BASICREF
  608.        program is being loaded.  This file will, therefore, normally
  609.        not be apparent to the user, and is mentioned here only for
  610.        information purposes.
  611.  
  612.  
  613.  
  614.                     RUNNING THE CROSS REFERENCE PROGRAM
  615.  
  616.  
  617.           Program Loading and Initiation
  618.  
  619.        The Cross Reference Utility can be loaded and run by ...
  620.  
  621.           1. Loading DOS from your DOS diskette until the prompt
  622.              A>  appears.
  623.           2. Inserting the cross reference program diskette in
  624.              drive A.
  625.           3. Typing the word:   BASICREF   .
  626.           4. Depressing the    Enter   key.
  627.  
  628.        The   BASICREF.EXE   module will be loaded and executed.
  629.  
  630.  
  631.  
  632.           Selection of Choice of Action
  633.  
  634.        Once the cross reference program is loaded, a title page will
  635.        be printed on the screen, and the following menu will appear
  636.        on the screen ...
  637.  
  638.  
  639.          . . . . SELECT CHOICE OF ACTION(S) AS FOLLOWS . . . .
  640.  
  641.        FUNCTION KEY                ACTION
  642.        ------------    ---------------------------------
  643.            F1          PROCESS BASIC SOURCE PROGRAM
  644.  
  645.            F2          PRINTOUT OF BASIC SOURCE PROGRAM
  646.  
  647.            F3          LIST CROSS REFERENCE OUTPUT ON THE SCREEN
  648.  
  649.            F4          LIST CROSS REFERENCE OUTPUT ON THE PRINTER
  650.  
  651.            F10         PERFORM SELECTED ACTION(S) OR EXIT PROGRAM
  652.  
  653.  
  654.  
  655.                                     6
  656.  
  657.  
  658.  
  659.  
  660.  
  661.        Function keys F1 through F4 are used to select the desired
  662.        actions.  Pressing any one of these keys will turn the
  663.        selected action on by highlighting the function key, shown in
  664.        the left hand column, with a reversed background.  Pressing
  665.        the function key again will turn off the selected action.  An
  666.        action can be alternately turned on and off by continued
  667.        depression of the function key.
  668.  
  669.        Pressing any keys other than function keys F1 through F4 or
  670.        F10 will have no effect at this point.
  671.  
  672.        When the desired functions have been selected, pressing the
  673.        F10 function key will begin program execution, if any of the
  674.        function selections F1 through F4 are activated.  If none of
  675.        the function selections F1 through F4 are activated when
  676.        function key F10 is depressed, program execution will end and
  677.        the computer will return to the DOS command mode.
  678.  
  679.        If any of the function selections F1 through F4 are activated,
  680.        the program will ask for the name of the BASIC source program
  681.        file and/or the cross reference file, and will then execute
  682.        each of the selected functions in turn.
  683.  
  684.        The program functions are explained very briefly in the ACTION
  685.        column in the menu above, and will be described at length
  686.        subsequently.  Before doing that, however, we will discuss the
  687.        specification of BASIC program and cross reference file names.
  688.  
  689.  
  690.  
  691.           Specification of BASIC Program File Name
  692.  
  693.        If either action F1, processing of the BASIC source program to
  694.        generate a cross reference file, or action F2, printout of the
  695.        BASIC source program to obtain a a printed listing, have
  696.        been selected, the program will ask for the name of the BASIC
  697.        source program file.
  698.  
  699.        The name of the BASIC source program file may be input in
  700.        upper case, lower case, or a combination of both, since the
  701.        program will convert any lower case letters to upper case.
  702.  
  703.        The filename that is input in response to the program prompt
  704.        will be treated in the same manner as BASIC would treat it.
  705.        If the filename extension is omitted, the program will assume
  706.        an extension of  .BAS  , so that a response of  TESTFILE
  707.        would be interpreted as  TESTFILE.BAS  .  If there is no
  708.        extension associated with the filename, the name should be
  709.        entered with only the period following the name as, for
  710.        example,  TESTFILE.   .
  711.  
  712.        When typing of the filename is complete, press the enter key.
  713.        If no characters have been typed, the program will ask for the
  714.        file name once again.
  715.  
  716.        The disk on the default drive, or on the drive specified in
  717.        the filename, will be searched for the specified BASIC program
  718.        file.  If the file is not found, or if the file is null, an
  719.        appropriate message will be printed on the screen, and the
  720.        program will ask for the input file name once again.
  721.  
  722.                                      7
  723.  
  724.  
  725.  
  726.        If the file is found, the program will check to verify that
  727.        the input file is an ASCII file.  If the "N" option has not
  728.        been selected (see discussion below on input file options) the
  729.        first record will be checked to see if it starts with a number
  730.        in the range of 0 to 65529.  If it does not, a message will be
  731.        printed on the screen that the file is not an ASCII file, and
  732.        the program will return to ask for the input file name once
  733.        again.
  734.  
  735.        If the "N" option has been selected (see discussion below on
  736.        input file options) the first record will be checked to see if
  737.        it starts with a number, an alphabetic character (A-Z or a-z)
  738.        or a blank.  If it does not, a message will be printed on the
  739.        screen that the file is not an ASCII file, and the program
  740.        will return to ask for the input file name once again.
  741.  
  742.        If the selected input file is found to be in the proper
  743.        format, the program will ask for the cross reference file name
  744.        (as discussed below) and/or proceed with processing.
  745.  
  746.        It should be noted that here, and throughout program
  747.        execution, pressing the F10 key will cancel all processing and
  748.        return to the main menu for reselection of program options.
  749.  
  750.  
  751.           Input File Options
  752.  
  753.        There are three options available relating to the processing
  754.        of the BASIC program input file.  The options are invoked by
  755.        entering as part of the input file name, immediately following
  756.        the filename specification, a slash   /   or backslash   \   ,
  757.        followed by the one-character option code or codes.  The
  758.        option codes may be entered in either lower or upper case, in
  759.        any order, with intermediate characters if desired to separate
  760.        the option codes.  Only valid option codes will be processed;
  761.        any invalid option codes will be ignored.
  762.  
  763.        The input file options are as follows...
  764.  
  765.           BASIC Version
  766.  
  767.            Option:  1  or  3  .  Default value (blank):  2
  768.  
  769.        The BASIC version option specifies which version of BASIC
  770.        applies, for proper differentiation between reserved words and
  771.        program variables.  If no option is given, the default value
  772.        of 2 is applicable, i.e., BASIC 2.0 reserved words are
  773.        assumed.  Options 1 and 3 specify BASIC versions 1.1 and 3.0,
  774.        respectively.
  775.  
  776.        The choice of options determines whether certain variables are
  777.        classified as reserved words or program variables in the cross
  778.        reference listing.  Assume, for example, that a BASIC program
  779.        contains the following variables, among others:
  780.                                 VALUE
  781.                                   INPUT
  782.                                     WINDOW
  783.                                       ENVIRON
  784.        Regardless of the option, in all versions    VALUE    will be
  785.        considered to be a program variable while    INPUT    will be
  786.        considered to be a reserved word.
  787.  
  788.                                    8
  789.  
  790.  
  791.  
  792.  
  793.        If option 1 has been selected, for BASIC version 1.1, both
  794.          WINDOW    and    ENVIRON    will be considered to be program
  795.        variables.  If no option has been selected, so that BASIC
  796.        version 2.0 applies by default, or if option 3 has been selected,
  797.        for BASIC version 3.0, both   WINDOW   and   ENVIRON   will be
  798.        considered to be reserved words.
  799.  
  800.        (It should be noted that the BASIC Version 3.0 reserved words
  801.        ENVIRON ,  ENVIRON$ ,  ERDEV ,  ERDEV$ ,  IOCTL ,  IOCTL$ ,  AND
  802.        SHELL  are also reserved words in BASIC Version 2.0, although
  803.        undocumented.  Therefore, BASICREF will consider them to be
  804.        reserved words in either case, and the default option and /3
  805.        option output will be identical).
  806.  
  807.        Similar differentiation will exist for other reserved words
  808.        that exist in one version of BASIC and not in another.
  809.        Obviously, if all reserved words in a program exist in all
  810.        versions of BASIC, it is immaterial which option is chosen.
  811.  
  812.        The BASIC version option selected will apply to any listing
  813.        of the cross reference file.  To change options, a new cross
  814.        reference file must be generated for the source program.
  815.  
  816.  
  817.           Statement Numbers
  818.  
  819.            Option:  N                    : Statement numbers optional
  820.                     Default value (blank): Statement numbers required
  821.  
  822.        Interpreter BASIC requires each statement to have a statement
  823.        number, and this condition will apply if the default option is
  824.        invoked.  In this case, the program will generate a message
  825.        that the input file is not an ASCII file if the first
  826.        statement in a BASIC program is un-numbered, or a message that
  827.        there is a direct statement in the file if the first statement
  828.        is numbered but a subsequent statement in un-numbered.  In
  829.        either case, processing will terminate and the program will
  830.        return to the main menu.
  831.  
  832.        In compiler BASIC, the statement numbers are optional, being
  833.        required only for branching.  If the   N   option is selected
  834.        (the same parameter as used to invoke the option with the
  835.        BASIC Compiler), the program will accept statements with or
  836.        without statement numbers.  In this case, the program will
  837.        generate a message that the input file is not an ASCII file,
  838.        and will return to the main menu, if the first character of
  839.        the first statement in a BASIC program is not a number, letter
  840.        or blank, but no checking for statement numbers will be done.
  841.  
  842.        Selection of the   N   option will apply to the specific run
  843.        during which the option is invoked.  In subsequent runs, when
  844.        either listing the BASIC program or generating the cross
  845.        reference file, the   N   option must be respecified, if
  846.        applicable.
  847.  
  848.        This option is of particular value for large programs that may
  849.        be taxing the capabilities of the BASIC compiler, and more
  850.        will be said about this subsequently.
  851.  
  852.                                    9
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.           BASIC Program Listing
  860.  
  861.            Option: Default value (blank) :  Formatted listing
  862.                    S                     :  Unformatted listing
  863.  
  864.        The BASIC source program may be listed by selecting the F2
  865.        option in the main menu.  All listings will be generated with
  866.        top and bottom margins, page numbering and page headings.
  867.        Additionally, as discussed subsequently, unless otherwise
  868.        specified, some formatting of statements will be done to
  869.        improve program readability.
  870.  
  871.        This formatting can be suppressed by the   S   option.  In
  872.        this case, each program statement will be printed as it would
  873.        appear if printed with an   LLIST   command with an 80 column
  874.        page width.
  875.  
  876.        Selection of the   S   option will only apply to the run in
  877.        which it is evoked.  If subsequent listings are desired with
  878.        suppression of formatting, the   S   option must be reinvoked
  879.        at that time.
  880.  
  881.        Details of the program listing will be discussed subsequently.
  882.  
  883.  
  884.  
  885.           Example of Input File Option Specification
  886.  
  887.        The following specifications will all invoke the same input
  888.        file options for a BASIC program named   TESTFILE.BAS   , for
  889.        example, in response to a program prompt for the input file
  890.        name:
  891.  
  892.                         TESTFILE.BAS/1NS
  893.                         TESTFILE\1/S/N
  894.                         TESTFILE/ N S 1 X
  895.                         TESTFILE.BAS//3\\s//n\\1
  896.  
  897.        In the third case, the parameter   X   has no meaning, and
  898.        will be ignored.  In the fourth case, both BASIC versions 1.1
  899.        and 3.0 are specified.  Where this redundancy occurs, the
  900.        rightmost specification will govern, and in this case BASIC
  901.        version 1.1 will apply.
  902.  
  903.  
  904.  
  905.           Specification of Cross Reference File Name
  906.  
  907.        If either action F1, processing of the BASIC source program to
  908.        generate a cross reference file, or action F3, printing the
  909.        cross reference listing on the screen, or action F4, printing
  910.        the cross reference listing on the printer, have been
  911.        selected, the program will ask for the name of the cross
  912.        reference file.
  913.  
  914.        The cross reference file name may be input in upper case,
  915.        lower case, or a combination of both, since the program will
  916.        convert any lower case letters to upper case.
  917.  
  918.                                  10
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.        If action F1, processing of the BASIC source program to
  926.        generate a cross reference file, has been selected, regardless
  927.        of whether actions F3 or F4 have been selected, a new cross
  928.        reference file will be produced, and the file name input will
  929.        be the name of the new file.  If action F1 has not been
  930.        selected, a listing will be made of a previously produced
  931.        cross reference file, and the file name input must be the name
  932.        of a cross reference file that already exists on the disk.
  933.  
  934.        In responding to the prompt for the cross reference file name,
  935.        if the filename extension is omitted, the program will assume
  936.        an extension of   .REF   , so that a response of   TESTFILE
  937.        would be interpreted as   TESTFILE.REF   .  If there is no
  938.        extension associated with the filename, the name should be
  939.        entered with only the period following the name as, for
  940.        example,   TESTFILE.    .
  941.  
  942.        If a BASIC source program input file was specified previously
  943.        in the run, as a result of choosing either the F1 or F2
  944.        options in the main menu, the program will assign a default
  945.        name to the cross reference file if you do not specify a
  946.        filename at this point.  In this case, the extension will be
  947.        changed from what it is in the BASIC  source program input file
  948.        (usually, but not necessarily,   .BAS   ) to   .REF   .  For
  949.        example, an input file named    TESTFILE.BAS   would result in
  950.        a cross reference file named    TESTFILE.REF   .
  951.  
  952.        When typing of the filename is complete, press the enter key.
  953.        If no characters have been typed, the program will either
  954.        ask for the cross reference file name once again, until one is
  955.        supplied, or assume a name as specified in the paragraph
  956.        above.
  957.  
  958.        If a BASIC source program input file was specified previously
  959.        in the run, as a result of choosing either the F1 or F2
  960.        options in the main menu, the program will first check to see
  961.        if the cross reference filename is different from the BASIC
  962.        source program filename.  If the names are the same, a message
  963.        will be produced to inform you that the names must be
  964.        different, and the program will request the cross reference
  965.        filename once again.  (Note that the same name will occur if
  966.        the program generates the cross reference filename and the
  967.        input file is named with an extension of   .REF   ).
  968.  
  969.        The disk on the default drive, or on the drive specified in
  970.        the filename, will be searched for the specified filename.  If
  971.        a new cross reference file is to be generated, because the F1
  972.        option was selected in the main menu, and the specified
  973.        filename does not exist on the disk, the program will assign
  974.        this name to the new cross reference file, and processing will
  975.        proceed.  However, if a new cross reference file is to be
  976.        generated and a file with the specified filename already
  977.        exists on the disk, the program will inform you of that fact
  978.        and give you an opportunity to change the name of the cross
  979.        reference file that will be generated.  You should note that
  980.        if you give the cross reference file the same name as that of
  981.        a file already on the disk, the contents of the original file
  982.        will be lost.
  983.  
  984.                                  11
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.        If a new cross reference file will not be generated, because
  992.        the F1 option was not selected in the main menu, the named
  993.        file must exist on the disk.  If the file is not found, an
  994.        error message will inform you of that fact, a request will be
  995.        made for the cross reference filename, and the disk will be
  996.        searched again until the file is found.  When the file is
  997.        found, the program will check to determine if the file is a
  998.        complete cross reference data file.  If the file is either not
  999.        a cross reference data file, i.e., the file was not generated
  1000.        by the Cross Reference Utility, or the file is not complete,
  1001.        i.e., a run was aborted before the complete file was
  1002.        generated, an appropriate error message will be printed on the
  1003.        screen and the program will ask for the cross reference file
  1004.        name once again.  When an acceptable cross reference file is
  1005.        found, the program will proceed with subsequent processing.
  1006.  
  1007.        As was mentioned earlier, it should be noted that here and
  1008.        throughout program execution, pressing the F10 key (and the
  1009.        enter key if the program is asking for a filename) will cancel
  1010.        all processing and return to the main menu for reselection of
  1011.        program options.
  1012.  
  1013.  
  1014.           Cross Reference Printout Options
  1015.  
  1016.        There are four options available relating to the printout of
  1017.        the cross reference listing.  The options are invoked by
  1018.        entering as part of the cross reference file name, immediately
  1019.        following the filename specification, a slash   /   or back-
  1020.        slash   \   , followed by the one-character option code or
  1021.        codes.  The option codes may be entered in either lower or
  1022.        upper case, in any order, with intermediate characters if
  1023.        desired to separate the option codes.  Only valid option codes
  1024.        will be processed; any invalid option codes will be ignored.
  1025.  
  1026.        The option codes provide for the suppression of sections of
  1027.        the cross reference listing printout.  This may be of interest
  1028.        in large programs where you may not be concerned with the
  1029.        complete information that could be listed.  The options will
  1030.        only be in effect during the run in which they are invoked;
  1031.        sections may be suppressed in one run and then printed in a
  1032.        subsequent run by omitting the particular option code.
  1033.  
  1034.        The cross reference printout options are as follows...
  1035.  
  1036.             S    Suppress printout of statement number references
  1037.             R    Suppress printout of reserved word references
  1038.             V    Suppress printout of program variable references
  1039.             I    Suppress printout of I/O related variable references
  1040.  
  1041.        The default for each is equivalent to omitting the option
  1042.        code, i.e., each section will be printed unless specified
  1043.        otherwise by the option code.
  1044.  
  1045.        Any options selected will apply to listings produced on both
  1046.        the screen and the printer.
  1047.  
  1048.  
  1049.                                   12
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.           Example of Cross Reference File Output Specification
  1056.  
  1057.        The following specifications will all invoke the same cross
  1058.        reference listing suppressions for a cross reference output
  1059.        file named   TESTFILE.REF   , for example, in response to a
  1060.        program prompt for the cross reference file name:
  1061.  
  1062.                            TESTFILE.REF/RI
  1063.                            TESTFILE\I/R
  1064.                            TESTFILE/ R I Z
  1065.                            TESTFILE.REF//r\\i//
  1066.  
  1067.        In all four cases,   TESTFILE.REF   is the cross reference
  1068.        output file, and the reserved word and I/O related listings
  1069.        are to be suppressed.  In the third case, the parameter   Z
  1070.        has no meaning, and will be ignored.
  1071.  
  1072.        If the F1 option had been selected in the main menu, to
  1073.        process a BASIC source program file, and neither option F3, to
  1074.        list the cross reference output on the screen, or option F4,
  1075.        to print the cross reference output on the printer, had been
  1076.        selected, all the parameters in the four specifications above
  1077.        would be ignored since cross reference listings would not be
  1078.        produced in that run.
  1079.  
  1080.  
  1081.  
  1082.           PROGRAM OPERATION FOR EACH ACTION SELECTED
  1083.  
  1084.  
  1085.           F1 - Processing of BASIC Source Program
  1086.  
  1087.        If the F1 option had been selected in the main menu, to
  1088.        process the BASIC source program, i.e., to generate a cross
  1089.        reference file for the BASIC program, processing will begin
  1090.        immediately after the input and output file names have been
  1091.        specified.
  1092.  
  1093.        Each statement in the BASIC source program will be processed
  1094.        in sequence.  The first 79 characters of the BASIC statement
  1095.        will be shown at the bottom of the screen in reversed image
  1096.        as the statement is being processed.
  1097.  
  1098.        Since the Cross Reference Utility is not a preprocessor, the
  1099.        BASIC statements are not checked for errors.  However, in the
  1100.        course of classifying variables as to type, errors involving
  1101.        useage of reserved words may be found and, if so, an error
  1102.        message will be printed on the screen.
  1103.  
  1104.        The following conditions will result in an error message being
  1105.        printed:
  1106.  
  1107.                  1. A reserved word appearing in a COMMON statement.
  1108.                  2. A reserved word appearing in a DIM statement.
  1109.                  3. A variable name that is a reserved word with a
  1110.                     type declaration character ($,%,!,#) at the end.
  1111.  
  1112.        In each case, the error message will be:
  1113.  
  1114.              SYNTAX ERROR IN STATEMENT XXXXX
  1115.  
  1116.                                 13
  1117.  
  1118.  
  1119.  
  1120.  
  1121.        where XXXXX is the number of the BASIC statement in which the
  1122.        error appears.  If the   /N   option is in effect and the
  1123.        statement with the error is un-numbered, the value of XXXXX
  1124.        will be that of the most recent statement number.  If there
  1125.        was no previously numbered statement in the program, the
  1126.        value of XXXXX will be 0.
  1127.  
  1128.        While the improper use of a reserved word name will be flagged,
  1129.        the variable used in this way will appear in the Variable
  1130.        References listing output discussed subsequently.
  1131.  
  1132.        The program will also print a warning message if command type
  1133.        statements are encountered under certain circumstances.  The
  1134.        warning message will be:
  1135.  
  1136.        ** CAUTION ** - STATEMENT NO. XXXXX CONTAINS A COMMAND...  YYYY
  1137.  
  1138.        where XXXXX is the number of the BASIC statement in which the
  1139.        command type statement appears, and YYYY is the command type
  1140.        statement.
  1141.  
  1142.        This caution will not be printed if the command type statement
  1143.        is anticipated, such as the commands   MERGE   or   DELETE
  1144.        in a   CHAIN   statement, or if the command type statement
  1145.        is encountered in a   DATA   statement.
  1146.  
  1147.        Regardless of whether a caution is issued, the command will
  1148.        appear in the Reserved Word References listing output discussed
  1149.        subsequently.
  1150.  
  1151.        Processing of the BASIC program will continue until all state-
  1152.        ments have been processed, or until the single-step capacity of
  1153.        the Cross Reference Utility has been reached.  When this occurs
  1154.        variable references and statement number references will be
  1155.        sorted internally by the utility, and the data will be written
  1156.        onto the cross reference file.  Comments at the bottom of the
  1157.        screen will inform you as to the program status.
  1158.  
  1159.        In most cases, the end of your BASIC program will occur before
  1160.        the capacity of the Cross Reference Utility is reached.  In
  1161.        practice, BASIC programs in excess of 1000 lines of coding have
  1162.        been within the capacity of the Cross Reference Utility to
  1163.        process in one pass.  However, the size of your program need
  1164.        not be of concern during processing.  If the capacity of the
  1165.        utility is reached, the sorting and writing to the disk will
  1166.        be done in stages, with appropriate merging of the data between
  1167.        stages.  As before, comments at the bottom of the screen will
  1168.        inform you as to the program status.
  1169.  
  1170.        Processing of the BASIC program in stages, if necessary, is done
  1171.        automatically by the Cross Reference Utility and will require no
  1172.        action on your part.  Although messages at the bottom of the
  1173.        screen will show when intermediate sorting or merging is being
  1174.        done, at the conclusion of processing there will be no differ-
  1175.        ence between a cross reference file generated in a single pass
  1176.        and one generated in more than one pass.
  1177.  
  1178.        As mentioned earlier, programs in the order of 1000 statements
  1179.        may be processed in one pass.  In practice, a maximum of two
  1180.  
  1181.                                   14
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.        stages has been necessary to process very large BASIC programs.
  1188.        In actuality, the Cross Reference Utility can process any size
  1189.        BASIC program, ad infinitum, in any number of stages necessary.
  1190.        Typically, however, the utility will process a BASIC program
  1191.        in one stage most of the time, and will not exceed two stages
  1192.        in just about any conceivable case.
  1193.  
  1194.        At the conclusion of processing of the BASIC program, the cross
  1195.        reference file will be written with information including the
  1196.        date and time.  The date and time will correspond to that when
  1197.        processing of the BASIC program was initiated.  The date and
  1198.        time will be established on the cross reference file, and this
  1199.        date and time will appear whenever the established cross refer-
  1200.        ence file is listed.
  1201.  
  1202.        As with anytime during the running of the cross reference
  1203.        utility, processing of the BASIC program may be terminated
  1204.        by depressing the F10 key, in which case the program will
  1205.        return to the main menu.  If this is done during processing
  1206.        of the BASIC program before any data were written to the disk,
  1207.        the cross reference file will be null, i.e., the file will
  1208.        have a length of 0.  If this is done after some data have
  1209.        been written to the disk, but before all data are written to
  1210.        the disk, the file will be incomplete.  In either case, a
  1211.        subsequent attempt to list the cross reference file will
  1212.        result in an error message that the file is not complete.
  1213.  
  1214.        An incomplete cross reference file will also result if there
  1215.        is insufficient disk space for the complete file.  This will
  1216.        not occur if sufficient space is assured on the disk, as
  1217.        discussed earlier.
  1218.  
  1219.        At the conclusion of normal processing of the BASIC program,
  1220.        the Cross Reference Utility will list the source program or
  1221.        the cross reference output, if the appropriate options were
  1222.        selected, or else return directly to the main menu.
  1223.  
  1224.  
  1225.  
  1226.           F2 - Printout of BASIC Source Program
  1227.  
  1228.        If the F2 option had been selected in the main menu, to print
  1229.        the BASIC source program on the printer, printout of the
  1230.        program will be done following the processing of the BASIC
  1231.        source program, if applicable.
  1232.  
  1233.        All printer output will be made assuming 8-1/2 x 11 page size
  1234.        with 80 column printout and 6 lines to the inch.  Printing
  1235.        will start at the line where the print head is positioned, so
  1236.        that the top margin will be determined by the setting of the
  1237.        paper in the printer.  The top and bottom margins will total
  1238.        6 lines, approximately.  (A BASIC statement that runs for
  1239.        more than one line will always have all lines appearing on the
  1240.        same page.  The bottom margin may vary, therefore, to prevent
  1241.        a statement from being split between two pages).
  1242.  
  1243.        All pages will be headed with the BASIC program file name, the
  1244.        date and time, and the page number, in the following format
  1245.        (spacing is reduced here, for illustrative purposes)...
  1246.  
  1247.                                  15
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.        BASIC Program file:  TESTPROG.BAS  11-07-84  01:12:23  PAGE  1
  1254.  
  1255.        If both the F1 and F2 options were selected in the run, the
  1256.        date and time shown in the program listing will be the same
  1257.        as the date and time established in the cross reference file.
  1258.        If the F1 option was not selected, the date and time shown in
  1259.        the program listing will be the date and time the program
  1260.        listing was started.
  1261.  
  1262.        If formatting of the BASIC program is being suppressed, by
  1263.        the use of the   /S   option in the BASIC program input file
  1264.        name, each statement will be printed as it would be printed
  1265.        by the   LLIST   command.  In the sample BASIC program on
  1266.        this disk,   TESTPROG.BAS   , statement number 110, for
  1267.        example, would be printed with the   /S   option as:
  1268.  
  1269.        110 IF A < 0 THEN 60 ELSE IF A=0 THEN CLOSE:END ELSE PRINT A
  1270.  
  1271.        If the   /S   option has not been invoked, some formatting
  1272.        will be done to improve program readability.  In this case,
  1273.        statement number 110 would appear as:
  1274.  
  1275.          110 IF A < 0 THEN 60_
  1276.                   ELSE IF A=0 THEN CLOSE:END_
  1277.                        ELSE PRINT A
  1278.  
  1279.        An underscore at the beginning or end of a line indicates that
  1280.        that position was blank in the unformatted statement.
  1281.  
  1282.        Additional formatting will be performed on statements that
  1283.        extend over more than one eighty column line.  This may be
  1284.        observed in any such statements that exist in a program.
  1285.  
  1286.        If the   /N   option was invoked, each BASIC statement will be
  1287.        preceded by a line number, which will correspond to the EDLIN
  1288.        line number for that statement.  (Column headings in this case
  1289.        will show that this is a line number).  Statement 110 above
  1290.        would then appear as:
  1291.  
  1292.  
  1293.          11   110 IF A < 0 THEN 60_
  1294.                        ELSE IF A=0 THEN CLOSE:END_
  1295.                             ELSE PRINT A
  1296.  
  1297.  
  1298.        The sample (although trivial) BASIC program   TESTPROG.BAS
  1299.        on this disk may be listed with various options to observe
  1300.        the differences in output.
  1301.  
  1302.        Listings produced with the F2 option in the main menu will
  1303.        only be generated on the printer.  If a program listing on the
  1304.        screen is desired, the BASIC program should be loaded under
  1305.        BASICA  and the   LIST   command executed, or a listing may be
  1306.        produced under DOS using the   TYPE   command or EDLIN.
  1307.  
  1308.        At the completion of the BASIC program listing, the cross
  1309.        reference program will return to the main menu if no other
  1310.        processing options have been specified, or else will perform
  1311.        the next program step in turn.
  1312.  
  1313.                                16
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.           F3 - List Cross Reference Output on the Screen
  1320.                                and
  1321.           F4 - List Cross Reference Output on the Printer
  1322.  
  1323.        The two options will be discussed together because they are
  1324.        quite similar in appearance.
  1325.  
  1326.        A listing will be produced on the screen if option F3 had been
  1327.        selected, and on the printer if option F4 had been selected.
  1328.        If both options were selected, a screen listing and a printer
  1329.        listing will be produced essentially simultaneously.
  1330.  
  1331.        If option F1 had been selected in the same run, then the cross
  1332.        reference listing produced will correspond to the BASIC source
  1333.        program previously processed in that run.  It should be noted
  1334.        that if option F2 had been selected in the run, but option F1
  1335.        had not been selected, the BASIC source program listed under
  1336.        option F2 will not necessarily correspond to the cross reference
  1337.        listing that is being produced.
  1338.  
  1339.        All printer output will be made assuming 8-1/2 x 11 page size
  1340.        with 80 column printout and 6 lines to the inch.  Screen output
  1341.        will be 80 columns wide.
  1342.  
  1343.        All output will be listed with the same page headings that were
  1344.        shown under the F1 option.  Individual column headings describe
  1345.        the contents of each output section.  Since the page length is
  1346.        different for the screen and printer, page numbers will differ
  1347.        on the two output media for the same program, except for the
  1348.        first page.
  1349.  
  1350.        If listing is being made on the printer only, printout will be
  1351.        continuous, and will end only when the report is completed.  If
  1352.        listing is being made on the screen, the listing will pause at
  1353.        the end of each screen page.  If listing is being made on the
  1354.        screen and printer simultaneously, the printer listing will
  1355.        pause while the screen listing is in a pause state.
  1356.  
  1357.        When the screen is in a pause state, pressing the space bar
  1358.        once will continue the listing until the end of the next page
  1359.        is reached, and so on.  If the space bar is pressed twice,
  1360.        within a period of 1/2 second, subsequent printing will be
  1361.        continuous, without a pause at the end of a screen page.  When
  1362.        printing continuously, depressing the space bar once will cause
  1363.        the resumption of the pause at the end of a screen page.  This
  1364.        cycle may be repeated as often as desired during the report
  1365.        printout.
  1366.  
  1367.        Each of the four sections of the cross reference report may be
  1368.        suppressed individually, as was discussed earlier, by selection
  1369.        of control characters in the cross reference file specification.
  1370.        A section suppressed in a run may be subsequently printed out
  1371.        by omitting the appropriate control character.
  1372.  
  1373.        Assuming the sections have not been suppressed, they will be
  1374.        printed in the order discussed in the sections following...
  1375.  
  1376.  
  1377.  
  1378.                                  17
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.            Listing of Statement Number References
  1389.  
  1390.        Each statement number in the program will be listed, along with
  1391.        the numbers of any statements that reference each.  If any
  1392.        statement is un-numbered, it will assigned the most recent prior
  1393.        statement number.  If there is no prior numbered statement, the
  1394.        un-numbered statement will be assigned a statement number of 0.
  1395.  
  1396.        The statement number reference section for the sample program
  1397.        of   TESTPROG.BAS   will be as follows...
  1398.  
  1399.  
  1400.          Statement    Reference
  1401.             10
  1402.             20
  1403.             30
  1404.             40
  1405.             50
  1406.             55         55     55
  1407.             60        110
  1408.             70
  1409.             80
  1410.             90
  1411.            100
  1412.            110
  1413.            120
  1414.            130
  1415.            140
  1416.            150       170
  1417.            160        50
  1418.            170
  1419.            180*      160     160
  1420.            190*      160
  1421.          *****       160
  1422.  
  1423.        *Statement number does not exist
  1424.        *Reference to invalid statement number
  1425.  
  1426.  
  1427.  
  1428.        If no entry appears alongside a statement number, that statement
  1429.        is unreferenced.  As in statement number 55, a statement may
  1430.        reference itself.  If a given statement references another more
  1431.        than once, the statement number is repeated under References, as
  1432.        is the case for references to statements 55 and 180.
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.                                   18
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.        For any references to statements that do not exist, the non-
  1454.        existent statement is listed followed by an asterisk, as are
  1455.        statements 180 and 190.  A note that the statement does not
  1456.        exist is printed on the page on which the non-existent statement
  1457.        appears.
  1458.  
  1459.        For a program containing the statement   RESUME 0   that does
  1460.        not have a statement numbered 0, the non-existent statement
  1461.        number message will be produced.  Although the    RESUME 0
  1462.        statement is valid, this treatment is consistent with that
  1463.        of the BASIC interpreter, which would give an "Undefined line
  1464.        number" error if you try to renumber a program under these
  1465.        conditions.  An   ON ERROR GOTO 0   statement will be treated
  1466.        the same way by the program, although the BASIC interpreter
  1467.        would treat it differently.
  1468.  
  1469.        For any references to invalid statement numbers, such as the
  1470.        reference to statement number 78000 in statement 160, the last
  1471.        entry in the list of statement numbers will be   *****   , with
  1472.        the referencing statement numbers being shown.  A note that there
  1473.        is a reference to an invalid statement number is printed on the
  1474.        last page of the statement reference report.
  1475.  
  1476.        Programs generated with the BASIC interpreter cannot have any
  1477.        duplication of statement numbers, since the BASIC system will
  1478.        replace a statement with a subsequent statement that has the
  1479.        same statement number.  However, a program to run under the
  1480.        BASIC compiler may have been generated through the use of the
  1481.        EDLIN utility and, conceivably, could have erroneous duplication
  1482.        of statement numbers.  In this case, the Reference field would
  1483.        show the duplication of statement numbers.  For example, a
  1484.        line that read...
  1485.  
  1486.            75      35     DUPL     110     120
  1487.  
  1488.        would mean that statement number 75 is referenced in statements
  1489.        35, 110 and 120 and, in addition, there is another statement
  1490.        number 75 in the program.
  1491.  
  1492.        Statement numbers appearing in a   CHAIN   statement will be
  1493.        referenced here if the statement numbers apply to the current
  1494.        program, but not if they apply to the chained-to program.  For
  1495.        example, in the statement:
  1496.  
  1497.             CHAIN MERGE "A:PROG1",1000,DELETE 2000-3000
  1498.  
  1499.        statements 2000 and 3000 will be referenced because they apply
  1500.        to the current program, but statement number 1000 will not be
  1501.        referenced because it specifies a line in the chained-to
  1502.        program.
  1503.  
  1504.        Following the printout of the statement number references, a
  1505.        listing of reserved word references is made.
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.                                19
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.            Listing of Reserved Word References
  1518.  
  1519.        The next section printed is a listing of all reserved words in
  1520.        the BASIC program and the statement numbers in which they
  1521.        appear.  For the sample program of   TESTPROG.BAS   a section
  1522.        of this listing (not consecutive) would be...
  1523.  
  1524.         Reserved Word    Reference
  1525.         BEEP                160
  1526.         CLOSE               110     150
  1527.         ERR                 160     160     160     160     160
  1528.         ON ERROR             50
  1529.         PRINT USING         100
  1530.         PRINT#              160
  1531.  
  1532.        A word appearing more than once in a statement will have the
  1533.        same reference repeated, as is the case for   ERR   above.
  1534.        Reserved words that have more significance as compound words
  1535.        rather than as individual words are shown in the compound form,
  1536.        as, for example,   ON ERROR   and   PRINT USING   above.
  1537.  
  1538.        For a reference to a function, as in   DEF FNXXX   , the entry
  1539.        in the reserved word listing will be   DEF FN   and in the
  1540.        program variable listing will be   FNXXX   .
  1541.  
  1542.        Reserved words will be listed in this section regardless of
  1543.        how they are used.  For example, the reserved word   FOR   is
  1544.        used differently in statement 60 than in statement 120, 130 or
  1545.        140, but all four references will be listed together.
  1546.  
  1547.        Reserved words that differ from one version of BASIC to another
  1548.        will be classified in accordance with the applicable version of
  1549.        BASIC that was specified with the BASIC source program filename
  1550.        when the cross reference file was originally generated.
  1551.  
  1552.        The listing of reserved word references will be followed by a
  1553.        listing of the program variable references.
  1554.  
  1555.  
  1556.            Listing of Program Variable References
  1557.  
  1558.        A listing of program variable references will follow, unless
  1559.        the listing is suppressed.  For the sample program of
  1560.        TESTPROG.BAS   , the variable reference listing will be..
  1561.  
  1562.        Variable         Reference
  1563.        A                    90    100    110    110    110
  1564.        A(20)                40     70     70
  1565.        B(2,5)               40
  1566.        C(100) [$]           40
  1567.        G$                   55     55     55
  1568.        I                    60     70     70     70     80
  1569.  
  1570.        The first variable   A   is different from the second variable,
  1571.        which is a subscripted variable.  This second variable was
  1572.        dimensioned as 20 in a DIM statement.  Similarly   B   was
  1573.        dimensioned as 2,5 in a DIM statement and   C   was dimensioned
  1574.        as 100 in a DIM statement.  A variable appearing, for example,
  1575.        as   D()   would have been dimensioned from use as a subscripted
  1576.        variable in a statement without a corresponding DIM statement.
  1577.  
  1578.                                 20
  1579.  
  1580.  
  1581.  
  1582.  
  1583.        A bracket following a variable name means that the variable is
  1584.        defined as other than its default type.  C(100) [$]   means, for
  1585.        example, that dimensioned variable C is defined (through the use
  1586.        of a DEFtype statement) as a string variable, rather than its
  1587.        normal default type of a single precision variable.
  1588.  
  1589.        The variable types that may appear within the brackets are:
  1590.  
  1591.               [I]  Integer
  1592.               [D]  Double precision
  1593.               [$]  String variable
  1594.  
  1595.        Note that a single precision variable does not appear within
  1596.        brackets, since a variable that is not shown with a bracketed
  1597.        type and does not have a rightmost character that is a type
  1598.        delimiter (!,#,%,$), must be a single precision variable.
  1599.  
  1600.        In a similar vein, any variable that has a rightmost character
  1601.        that is a type delimiter will never be shown with a bracketed
  1602.        type, since a type delimiter always takes precedence over a
  1603.        DEFtype statement.
  1604.  
  1605.        A variable shown in a   DEF FNXXX   statement will be listed
  1606.        here with a variable name of   FNXXX   .
  1607.  
  1608.        The listing of program variable references will be followed
  1609.        by a listing of I/O related variable references, if any.
  1610.  
  1611.  
  1612.  
  1613.  
  1614.            Listing of I/O Related Variable References
  1615.  
  1616.        The last section of the cross reference listing will show
  1617.        I/O related variable references, if any.  For the sample
  1618.        program of   TESTPROG.BAS   , for example, the listing is...
  1619.  
  1620.  
  1621.        I/O Related      Reference
  1622.        "KYBD:"             140
  1623.        "LPT1:"             130
  1624.        "SCRN:"             120
  1625.        AS                  120    130    140
  1626.        OUTPUT              120    130
  1627.  
  1628.  
  1629.        Any device name or file name will appear here.  Similarly the
  1630.        descriptors   AS   and   OUTPUT   , when used in an   OPEN
  1631.        statement, will appear here.
  1632.  
  1633.        Differentiation should be noted between the names appearing
  1634.        above and similar names that may be reserved words or program
  1635.        variables.  For example,   KYBD:   is a device name while
  1636.           KYBD   used in a statement would be a program variable.
  1637.        The words   AS   and   OUTPUT   as used in an   OPEN   statement
  1638.        are neither reserved words nor variable names; the same words
  1639.        used in a different context would be program variables and would
  1640.        appear in the program variable reference section.
  1641.  
  1642.  
  1643.                                 21
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.        As an extreme case, consider the following line of coding:
  1650.  
  1651.          1000 OPEN "OUTPUT" FOR OUTPUT AS #1:OUTPUT=12
  1652.  
  1653.        This would generate three entries for   OUTPUT   , each with a
  1654.        different meaning...
  1655.  
  1656.          "OUTPUT" as a filename in the I/O Related Variable References
  1657.          OUTPUT as a descriptor in the I/O Related Variable References
  1658.          OUTPUT as a variable name in the Program Variable References
  1659.  
  1660.        Note that the word   INPUT   in statement 140 does not appear
  1661.        here.  Since it is a reserved word, it appears in the reserved
  1662.        word reference section.
  1663.  
  1664.        The listing of I/O related variable references concludes the
  1665.        output of the cross reference listing.
  1666.  
  1667.        Following the end of the cross reference listing, the utility
  1668.        will return to the main menu.  Additional processing may then
  1669.        be done, or an exit back to DOS may be made.
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.           COMMENTS REGARDING COMPILED BASIC PROGRAMS
  1676.  
  1677.        Having made mention of compiled BASIC programs several times,
  1678.        it behooves us to make some comments in this regard.  This
  1679.        would seem to be an appropriate point.
  1680.  
  1681.        Anyone who has worked with BASIC for any period of time must
  1682.        surely be aware that interpreted BASIC can be excrutiatingly
  1683.        slow.  For programs of any substance, execution time can be
  1684.        a severe impediment.  In many cases, serious consideration
  1685.        should be given to converting programs from interpreted BASIC
  1686.        to compiled BASIC.  The increase in speed can vary from a small
  1687.        factor to a very major improvement.
  1688.  
  1689.        As an example of the speed advantage of compiled BASIC over
  1690.        interpreter BASIC, we refer you to the article "Four FORTH's"
  1691.        in the April 1984 issue (Vol.2, No. 5) of PC World magazine,
  1692.        and our letter on page 26 of the September 1984 issue (Vol 2,
  1693.        No. 10) of the same magazine.  We pointed out that the timing
  1694.        for a program to calculate prime numbers (The Sieve of
  1695.        Eratosthenes) decreased from 539 seconds under interpreted BASIC
  1696.        as reported in the article on FORTH, to 11 seconds when run with
  1697.        compiled BASIC.  This difference is, admittedly, extreme but
  1698.        is indicative of what can happen.
  1699.  
  1700.        The discussion that follows was written when we were using
  1701.        the IBM BASIC compiler and EDLIN.  Like many others, we have
  1702.        gone on to bigger and better things.  We now use Microsoft's
  1703.        QuickBASIC exclusively, and have graduated to a full screen
  1704.        editor.  So take what follows with a grain of salt.  (Along
  1705.        this line, we would appreciate your letting us know if you
  1706.        would be interested in a cross reference utility for the
  1707.        QuickBASIC compiler.  Please see the order form at the end
  1708.        of this documentation).....
  1709.  
  1710.                                  22
  1711.  
  1712.  
  1713.  
  1714.  
  1715.        We typically develop a program in interpreted BASIC for its
  1716.        greater ease in testing and debugging.  We maintain a version
  1717.        of the program with appropriate changes for compiler BASIC as
  1718.        we go along.  This allows us to develop the compiled version
  1719.        in parallel with the interpreted version.
  1720.  
  1721.        Eventually, with a program of any substance, we run into a
  1722.        problem with the compiled version of the program.  We start
  1723.        getting nasty   TC   messages during compilation, telling us
  1724.        that the program is too complex.  The problem invariably is
  1725.        a result of too many statement numbers exceeding the capacity
  1726.        of the compiler.  The excess of statement numbers is a carry-
  1727.        over from the fact that interpreter BASIC requires every
  1728.        BASIC program statement to be numbered.  Since compiled BASIC
  1729.        only requires statement numbers for transfer purposes, the
  1730.        program can be modified to fit within compiler limitations
  1731.        by removing unnecessary statement numbers.
  1732.  
  1733.        An additional benefit of removal of unneeded statement numbers
  1734.        is that the compiler can then produce a more efficient code.
  1735.        We therefore have two very good reasons for doing this - the
  1736.        question is how?
  1737.  
  1738.        Once we remove any statement number from a line of coding we
  1739.        will no longer be able to read the program as a BASIC program
  1740.        file.  However, if we save the interpreter BASIC program in
  1741.        ASCII format we will be able to modify the program using
  1742.        the Line Editor (EDLIN) under DOS.  And if you refer to the
  1743.        statement number references listing you will see that any
  1744.        statement in the listing that does not have any references
  1745.        shown next to it can be removed as a statement number.
  1746.  
  1747.        The enhanced version of our cross reference utility has
  1748.        the capability to take a BASIC source program file and the
  1749.        corresponding cross reference file, and to automatically
  1750.        generate a new source program file that has all the
  1751.        unreferenced statement numbers removed.  The enhanced
  1752.        version is described at the end of this documentation, and
  1753.        we invite you to give it a try.
  1754.  
  1755.        Until you do, we offer the following method to accomplish
  1756.        this.  It probably seems tedious, and it is, but remember you
  1757.        only have to do this once for a program and you're finished.
  1758.        So here goes...
  1759.  
  1760.  
  1761.        1. Load the BASIC program into memory with the BASIC
  1762.           interpreter and save the program on disk (as you have to
  1763.           do to run the Cross Reference Utility) with the command:
  1764.                  SAVE "FILENAME",A    .
  1765.  
  1766.        2. Run the Cross Reference Utility for the BASIC program saved
  1767.           above, and obtain a printout of the statement number
  1768.           references.
  1769.  
  1770.        3. List the BASIC program with the Cross Reference Utility
  1771.           using the    /N    control parameter.  This will list the
  1772.           line number for each BASIC statement in the program.
  1773.  
  1774.  
  1775.                                   23
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.        4. Load the program into memory under DOS using EDLIN.  (See
  1782.           the DOS manual for complete information on using EDLIN).
  1783.           This can be accomplished by the command
  1784.                        EDLIN filespec    .
  1785.  
  1786.        5. Each statement in the statement number reference listing
  1787.           that does not have a reference shown can have its statement
  1788.           number removed.  The program listing will give the line
  1789.           number corresponding to the EDLIN line number for each
  1790.           statement.  These two documents can be used in combination
  1791.           to accomplish the statement number removal, as follows.
  1792.  
  1793.  
  1794.        6. For illustrative purposes, we'll use the sample program
  1795.           TESTPROG.BAS    on this disk.  Use the cross reference
  1796.           utility to get the listings you need.
  1797.  
  1798.        7. The first statement number that can be removed is statement
  1799.           number 10, which has no references listed.  From the program
  1800.           listing, this statement is line number 1.
  1801.  
  1802.        8. EDLIN displays the prompt    *    .  Type the number   1   ,
  1803.           following the asterisk, for line number 1, and press the
  1804.           enter key.
  1805.  
  1806.        9. EDLIN will display the prompt and line number followed by
  1807.           contents of that line.  Under it will be the prompt and
  1808.           line number repeated with the rest of the line blank.
  1809.  
  1810.       10. Press the space bar twice.  This will blank out the statement
  1811.           number in the replacement line.
  1812.  
  1813.       11. Press the F3 key.  This will duplicate the rest of the line.
  1814.           The new line should be identical to the original line except
  1815.           that the statement number will have been blanked out.
  1816.  
  1817.       12. Press the enter key.  The line will be changed in memory, and
  1818.           EDLIN will return to the asterisk prompt.
  1819.  
  1820.       13. Repeat steps 8 through 12 for each additional statement
  1821.           number to be deleted.  For the sample program, statement
  1822.           numbers 20 through 50, 70 through 140, and 170, corresponding
  1823.           to line numbers 2 through 5, 8 through 15, and 18,
  1824.           respectively, remain to be processed.
  1825.  
  1826.       14. When all changes have been made, follow the asterisk prompt
  1827.           with the letter   E   and press the enter key.
  1828.  
  1829.       15. When EDLIN is finished updating the files, the original file
  1830.           will be renamed with an extension of   .BAK   and the new
  1831.           file will have the filename and extension that was specified
  1832.           in the EDLIN command.
  1833.  
  1834.       16. This new file may now be used as input to the BASIC compiler
  1835.           and to the Cross Reference Utility, in both cases with a
  1836.           /N parameter.
  1837.  
  1838.       17. Subsequent changes to this new file will have to be made
  1839.           using EDLIN since the BASIC interpreter will no longer accept
  1840.           the program with missing statement numbers.
  1841.  
  1842.                                  24
  1843.  
  1844.  
  1845.  
  1846.  
  1847.       18. One final fly in the ointment.  Your BASIC source program
  1848.           may be too large for EDLIN to load into memory completely.
  1849.           If the file is loaded completely, EDLIN will display the
  1850.           message
  1851.                         End of input file
  1852.                         *_
  1853.  
  1854.           If only the asterisk prompt appears, the file has not been
  1855.           fully loaded.  In that case, eventually when you enter a
  1856.           line number nothing will happen, and EDLIN will simply
  1857.           repeat the asterisk prompt on the next line.  At this point
  1858.           you are past the end of the file in memory.  Not to worry...
  1859.  
  1860.       19. Follow the asterisk prompt with the letter   W   and press
  1861.           the enter key.  This will write the changed file onto disk.
  1862.  
  1863.       20. Follow the next asterisk prompt with the letter   A   and
  1864.           press the enter key.  This will append more of the file into
  1865.           memory.  You will then be able to continue as before, with
  1866.           one adjustment.
  1867.  
  1868.       21. The line numbers for the statements in memory will, for the
  1869.           moment, no longer correspond to what you have in the program
  1870.           listing.  This is because the first line in memory is now
  1871.           a program statement from somewhere in the middle of your
  1872.           program.  Once more, not to worry...
  1873.  
  1874.       22. Follow the asterisk prompt with the numeral   1   and press
  1875.           the enter key.  Line 1 will now be displayed.  (Pressing
  1876.           the enter key at this point will get you back to the asterisk
  1877.           prompt without making a change in line 1).
  1878.  
  1879.       23. Now find the BASIC program statement in your program listing
  1880.           corresponding to the statement shown in line 1.  This will
  1881.           provide you with the offset from the statement numbers in
  1882.           your listing, and the requested line number can be adjusted
  1883.           accordingly.
  1884.  
  1885.       24. Assume, for example, that line number 1 shown by EDLIN is
  1886.           line number 855 in your program listing.  Then to find a
  1887.           line number XXX in your program listing, subtract 854
  1888.           (855-1) from XXX and use the result as the line number
  1889.           requested of EDLIN.
  1890.  
  1891.       25. In the example above, program listing line number 855 would
  1892.           be requested as line number 855-854 = 1 to EDLIN, program
  1893.           listing line number 1000 would be requested as line number
  1894.           1000-854 = 146 to EDLIN, etc.
  1895.  
  1896.       26. Steps 19 through 25 may have to be repeated in the unlikely
  1897.           event that the complete program was still not processed.
  1898.           The procedure is complete when EDLIN displays the
  1899.           End of input file    message.
  1900.  
  1901.       27. At the completion of these changes, follow the asterisk
  1902.           prompt with the letter   E    and press the enter key to
  1903.           update the file, as mentioned above.
  1904.  
  1905.  
  1906.  
  1907.                                 25
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.        If all this seems tedious, remember...
  1914.  
  1915.             1. You only have to do this once for a particular program.
  1916.  
  1917.             2. You don't have to do the whole thing at one sitting.
  1918.                You can do part of it with EDLIN, end the session with
  1919.                the   *E   entry, and continue at another time.
  1920.  
  1921.             3. Once you get the knack of it, it will proceed very fast
  1922.                since the actual procedure is quite simple.
  1923.  
  1924.             4. It will be well worth the effort in terms of what you
  1925.                will be able to accomplish with the BASIC compiler.
  1926.  
  1927.             5. You can eliminate all the tedium by purchasing the
  1928.                enhanced version of our cross reference utility.
  1929.  
  1930.  
  1931.               SOME FINAL WORDS
  1932.  
  1933.        Although some people might argue otherwise, nobody's perfect.
  1934.        We've tested our Cross Reference Utility thoroughly and there
  1935.        are no bugs that we know about.  But things being what they
  1936.        are, there undoubtedly will be bugs showing up as the program
  1937.        finds more and more use.  We`d appreciate it if you would let
  1938.        us know if you encounter any problems with the program.  We
  1939.        promise to consider all correspondence and we'll do our best
  1940.        to fix any bugs that may occur.
  1941.  
  1942.        Along the same tack, we'd appreciate any comments you have
  1943.        regarding changes, improvements, enhancements, etc. that you
  1944.        would like to see in the program.  Again, we'll give thorough
  1945.        consideration to all suggestions, and we'll try to incorporate
  1946.        those that appear to be of most potential interest.
  1947.  
  1948.  
  1949.  
  1950.            ENHANCED CROSS REFERENCE UTILITY
  1951.  
  1952.        We invite you to try our enhanced Cross Reference Utility.
  1953.        Following are the features that will probably be of greatest
  1954.        interest.
  1955.  
  1956.           1. The enhanced version produces a cross reference for
  1957.              compiled BASIC programs in terms of line numbers,
  1958.              rather than statement numbers.  This is of particular
  1959.              benefit in typical compiled programs that have mostly
  1960.              un-numbered statements.  If you run a cross reference
  1961.              for a compiled program with this version of BASICREF,
  1962.              you will see many references to the same statement
  1963.              number for blocks of coding, if the program does not
  1964.              have many statement numbers.  In the enhanced version,
  1965.              each line will have a unique reference.  The difference
  1966.              is appreciable, making it much easier to locate items
  1967.              in a listing produced by the enhanced version.
  1968.  
  1969.           2. The enhanced version has a routine to automatically
  1970.              remove unreferenced statement numbers from a BASIC
  1971.              program, to increase the benefit from compiled BASIC
  1972.              programs as discussed earlier.
  1973.  
  1974.                                26
  1975.  
  1976.  
  1977.  
  1978.  
  1979.           3. The enhanced version of BASICREF can automatically
  1980.              remove REM statements from a source program.  This will
  1981.              free additional memory in interpreter BASIC programs where
  1982.              program size is straining available memory.
  1983.  
  1984.           4. The enhanced version of BASICREF provides a simplified
  1985.              procedure for unprotecting interpreter BASIC programs
  1986.              that have been saved to disk with the  P  option.
  1987.  
  1988.  
  1989.  
  1990.        If you find this version of the Cross Reference Utility useful
  1991.        we think you will find the enhanced version of the program
  1992.        even more useful.  You can order the enhanced version for
  1993.        twenty five dollars (thirty five if you haven't sent the ten
  1994.        dollar contribution for the standard version), and for your
  1995.        money you will get ...
  1996.  
  1997.          1. A disk containing the enhanced program.
  1998.          2. Free updates, corrections, modifications, etc. to
  1999.             the program any time after purchase.  (You'll just
  2000.             have to supply a blank disk, mailer and postage).
  2001.          3. Free consultation by mail or phone on any aspect
  2002.             of the program.
  2003.  
  2004.        An order form appears on page 29 for your convenience.
  2005.  
  2006.        *** And as a special bonus, so that you won't have to pay
  2007.        for BASICREF twice, if you purchased this standard version
  2008.        from any of the several user groups and other sources (as
  2009.        opposed to obtaining a copy free from a friend) you can
  2010.        deduct five dollars from the price of the enhanced version.
  2011.        See the order form for details. ***
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.                                     27
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.                            DISCLAIMER
  2047.  
  2048.        This program is provided "as is" without warranty of any kind,
  2049.        either express or implied, including, but not limited to, the
  2050.        implied warranties of merchantability and fitness for a
  2051.        particular purpose.  In no event will the Author be liable for
  2052.        any damages, including any lost profits, lost savings or other
  2053.        incidental or consequential damages arising out of the use or
  2054.        inability to use this program, even if the Author has been
  2055.        advised of such damages, or for any claim by any other party.
  2056.  
  2057.  
  2058.  
  2059.        Despite this necessary legality, it should be obvious by now
  2060.        that we have corrected bugs in the program, and we assure you
  2061.        that we will continue to do so.  Just let us know of any you
  2062.        find and we will do our best to maintain the program in an
  2063.        error-free condition.
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.                                  28
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.         - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  2114.  
  2115.               PROGRAM ORDER/CONTRIBUTION/INFORMATION FORM
  2116.  
  2117.        To:  Excelsior Software, Inc.
  2118.             P. O. Box 226
  2119.             New Milford, NJ 07646
  2120.  
  2121.        Please send a copy of the enhanced version of the BASIC Cross
  2122.        Reference Utility.  I understand that this version of BASICREF
  2123.        is copyrighted, and I agree not to distribute any unauthorized
  2124.        copies of the enhanced version.
  2125.  
  2126.           ___ BASIC Cross Reference Utility -     @ $25.00      ______
  2127.                            Enhanced Version
  2128.  
  2129.           ___ Contribution for the standard -       $10.00      ______
  2130.               version of BASICREF if not
  2131.               previously submitted.
  2132.  
  2133.                                                   Subtotal      ______
  2134.           ___ I obtained the standard version
  2135.               of BASICREF from the following paid
  2136.               source: ______________________________
  2137.               I am deducting $5.00 from the purchase price      ______
  2138.  
  2139.                                             Total Enclosed      ______
  2140.  
  2141.          Ship To: __________________________________________
  2142.                   __________________________________________
  2143.                   __________________________________________
  2144.                   __________________________________________
  2145.  
  2146.  
  2147.        Please pay by check or money order.  For orders to New Jersey
  2148.        please add 6% sales tax.  BASICREF requires DOS 2.0 or later.
  2149.  
  2150.        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  2151.  
  2152.         _____  I'm not ready to order the enhanced version just now,
  2153.      but I do want to further the "User Supported" concept.  Enclosed
  2154.      find a contribution of ten dollars in support of the standard
  2155.      version of BASICREF.  I understand you will keep me informed of
  2156.      any corrections you make to the standard version of the program.
  2157.  
  2158.  
  2159.         _____ I would be interested in a version of BASICREF for the
  2160.      Microsoft QuickBASIC compiler.  Please let me know when you have
  2161.      a version available.  I understand that this does not obligate
  2162.      me in any way.
  2163.  
  2164.      Name & address: _________________________________________
  2165.                      _________________________________________
  2166.                      _________________________________________
  2167.                      _________________________________________
  2168.  
  2169.      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  2170.  
  2171.                                    29
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.