home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / dscar1.zip / DSCAR.DOC < prev    next >
Text File  |  1986-07-02  |  37KB  |  1,201 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.                                    d S C A R
  20.  
  21.                      dBASE Source Code Analyzer & Reporter
  22.  
  23.                                        by
  24.  
  25.                                    Ryan Katri
  26.  
  27.  
  28.  
  29.  
  30.  
  31.                                   Version 1.0
  32.                                   July 1, 1986
  33.  
  34.  
  35.  
  36.  
  37.  
  38.                                    Ryan Katri
  39.                               2575 Drake Hill Road
  40.                                Fortuna, CA  95540
  41.  
  42.                              Voice:  (707) 725-5559
  43.                              Modem:  (707) 725-9612   (7pm-3pm)
  44.  
  45.  
  46.  
  47.  
  48.  
  49.                         Copyright (c) 1986 by Ryan Katri
  50.                               All Right Reserved.
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.                               dSCAR User's Guide
  73.                               Table of Contents
  74.  
  75.                Purpose . . . . . . . . . . . . . . . . . . . .3
  76.                System Requirements . . . . . . . . . . . . . .3
  77.                Read This!  . . . . . . . . . . . . . . . . . .3
  78.                Installation  . . . . . . . . . . . . . . . . .5
  79.                Invoking dSCAR  . . . . . . . . . . . . . . . .6
  80.                The Menu  . . . . . . . . . . . . . . . . . . .7
  81.                Quitting dSCAR. . . . . . . . . . . . . . . . .8
  82.                Diagram Program Flow  . . . . . . . . . . . . .8
  83.                Control Only  . . . . . . . . . . . . . . . . .9
  84.                Errors Only . . . . . . . . . . . . . . . . . .9
  85.                Line Numbering  . . . . . . . . . . . . . . . .9
  86.                Modules . . . . . . . . . . . . . . . . . . . .10
  87.                Variables Cross-Reference . . . . . . . . . . .10
  88.                Output  . . . . . . . . . . . . . . . . . . . .11
  89.                GO! . . . . . . . . . . . . . . . . . . . . . .12
  90.                Additional Modules  . . . . . . . . . . . . . .12
  91.                Batch Mode  . . . . . . . . . . . . . . . . . .13
  92.                Limitations . . . . . . . . . . . . . . . . . .14
  93.                Appendix A: Reporting Problems  . . . . . . . .15
  94.                Appendix B: Error Messages  . . . . . . . . . .16
  95.                Appendix C: Future Enhancements . . . . . . . .17
  96.                Appendix D: About Me & My Program & My Help . .18
  97.                Appendix E: Disclaimer. . . . . . . . . . . . .19
  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.                                     Page 3   
  126.  
  127.           
  128.  
  129.           -Purpose-
  130.           ---------
  131.  
  132.           To put it bluntly,  dSCAR is a tool for dBASE III and  dBASE  III
  133.           Plus that performs the following functions:
  134.  
  135.                -- Structured formatting of dBASE code (indentation).
  136.  
  137.                -- Flow diagrams to highlight control statements.
  138.  
  139.                -- Cross-referencing of variables and field names.
  140.  
  141.                -- Display structural errors in code.
  142.  
  143.                -- Line numbering of source code.
  144.  
  145.                -- Selectable options to get the report you want.
  146.  
  147.                -- Ability to send any reports to screen, printer or disk.
  148.  
  149.                -- Menu-driven or command-driven.
  150.  
  151.           -System Requirements-
  152.           ---------------------
  153.  
  154.           dSCAR  should  work  on  any IBM PC/XT or compatible machine that
  155.           meets the requirements of running dBASE III or dBASE III Plus.
  156.  
  157.           It was developed under PC-Dos 3.1,  but should work on most lower
  158.           versions of Dos.
  159.  
  160.           dSCAR  can  also process dBASE II source code.  The only drawback
  161.           is if you use a dBASE III reserved word for a variable  or  field
  162.           name.  If  this  is  done,  the  variable  or  field  name is NOT
  163.           included  in  the  variables  cross-reference.   You   may   also
  164.           experience  this  problem  using  dBASE  III if you have used any
  165.           dBASE III Plus reserved words as variables.
  166.  
  167.           -READ THIS!-
  168.           ------------
  169.  
  170.           This is a full-fledged version of dSCAR.  The only drawback to it
  171.           is that it displays a title page every time  it  is  brought  up.
  172.           This screen can by by-passed by pressing <return>.
  173.  
  174.           If <return> is not pressed, dSCAR will continue execution after a
  175.           30-second wait, thus allowing dSCAR to be run in batch files with
  176.           un-attended operation.
  177.  
  178.           Optionally,  you  can  press  the  letter  key 'I' to bring up an
  179.           invoice for dSCAR that can be printed by hitting Shift+PrtScr.
  180.  
  181.  
  182.  
  183.  
  184.  
  185.                                     Page 4   
  186.  
  187.           You can register your copy of dSCAR by sending $20 - $100,000 (or
  188.           more if you have it!) to this name and address:
  189.  
  190.                            Ryan Katri
  191.                            2575 Drake Hill Road
  192.                            Fortuna, CA  95540
  193.  
  194.           If  you  do register you will receive the latest version of dSCAR
  195.           (are there going to be any more versions?) without the title page
  196.           garbage.  In this form, dSCAR can be instantly fired up and ready
  197.           to go to work on your dBASE code!
  198.  
  199.           When you register,  be sure to include your mailing  address  and
  200.           phone  number.  I would also appreciate any comments about dSCAR:
  201.           suggestions for improvements, how you are using it, where you got
  202.           it, etc.
  203.  
  204.           The registered version will be sent to you through  the  mail  or
  205.           you can elect to download it from my Bulletin Board System:
  206.  
  207.                              M.I.T. Colossus
  208.                              (707) 725-9612
  209.                              7pm-3pm, 7 days a week.
  210.                              300/1200/2400 Baud
  211.  
  212.           The latest demo version can also be found on my BBS.
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.                                     Page 5   
  246.  
  247.           
  248.  
  249.           -Installation-
  250.           --------------
  251.  
  252.           To  configure  dSCAR for your particular system setup,  run dSCAR
  253.           using 'C' as an argument on the command line, like this:
  254.  
  255.                            DSCAR C
  256.  
  257.           dSCAR immediately comes up with  the  installation  questions  to
  258.           customize  it  for  both your needs and your hardware (especially
  259.           your  printer).   Each  question  is  detailed  below  under  its
  260.           appropriate heading.  Note that defaults are displayed except for
  261.           certain questions.  All yes/no questions default to 'no'.
  262.  
  263.           Your basic cursor editing keys are in effect. <Insert>, <Delete>,
  264.           and arrow keys all work like you would expect.
  265.  
  266.           NUMBER  OF  SPACES  FOR  INDENTATION:  This  is  the  indentation
  267.              increment you want to use below control  statements,  such  as
  268.              IF, DO WHILE, DO CASE, etc.  Shown below are two pieces of the
  269.              same  code,  the first with an indentation of 3 and the second
  270.              with an indentation of 5.
  271.  
  272.                  store 1 to count                 This is code produced
  273.                  do while count < 100             with an indentation
  274.                      if count = 50 then           of three (3).
  275.                         ? 'Halfway there!'
  276.                      endif
  277.                      x = x + 1
  278.                  enddo
  279.  
  280.                  store 1 to count                 This is with indentation
  281.                  do while count < 100             five (5).
  282.                        if count = 50 then
  283.                             ? 'Halfway there!'
  284.                        endif
  285.                        x = x + 1
  286.                  enddo
  287.  
  288.  
  289.           STRIP DRIVE/PATH FROM FILENAMES:  This options defaults to  'no',
  290.              use  the  drive  and  path specified.  Regardless of what this
  291.              option is set to,  dSCAR always recognizes and uses  any  path
  292.              appended to the main file you enter at start-up.
  293.  
  294.              This  option  is  especially important when the option Modules
  295.              (detailed later) is turned on.  See the  Modules  section  for
  296.              more information.
  297.  
  298.           PRINTER LENGTH: The printer length tells dSCAR how many lines are
  299.              on  the  paper  so  that it can issue a formfeed at the proper
  300.              time to skip over the perforation.  The  default  should  work
  301.  
  302.  
  303.  
  304.  
  305.                                     Page 6   
  306.  
  307.              for paper that is the standard 11 inches long.
  308.  
  309.           PRINTER  WIDTH:  Some of you probably use wide carriage printers,
  310.              so this option will keep dSCAR from printing on only half  the
  311.              page.  If  you  set  your  printer for condensed mode you will
  312.              probably also want to reset this.
  313.  
  314.           PRINTER SETUP SEQUENCE:  Up to 10 characters may be sent to  your
  315.              printer.  This  may be used to set condensed mode,  emphasized
  316.              print,  or a variety of other options you may want to use when
  317.              printing out your source code with dSCAR.
  318.  
  319.              To  send an escape,  press the ESCape key.  To send other non-
  320.              printable ascii characters,  hold down the ALT key  and  enter
  321.              the  ascii code using the numeric keypad.  Keyboard characters
  322.              can be easily entered by typing the character.  When  you  are
  323.              done  entering  codes,  enter  a  blank  line  by  hitting the
  324.              <Return> key.
  325.  
  326.           PRINTER RESET SEQUENCE:  When you are  done  using  dSCAR,  these
  327.              printer  codes  will  be  sent  (if defined).  Follow the same
  328.              method detailed above in the Setup Sequence for entering  your
  329.              printer codes.
  330.  
  331.           The   last   question   asked   is  if  you  want  to  save  your
  332.           configuration.  If you made a mistake and want to start over  (by
  333.           re-running dSCAR), answer no.
  334.  
  335.           If  saving  the configuration is confirmed,  dSCAR will ask for a
  336.           filename to clone itself to.  Do not include  an  extension  with
  337.           the filename, as dSCAR automatically adds the .COM extension that
  338.           is needed.
  339.  
  340.           Upon entering the filename, dSCAR will write a new copy of itself
  341.           to  your file.  This file may be run just like the original dSCAR
  342.           was!!  There is no need for any external configuration files.
  343.  
  344.           Consider the new copy your custom version!
  345.  
  346.           -Invoking dSCAR-
  347.           ----------------
  348.  
  349.           Running dSCAR in the  menu-driven  mode  is  as  easy  as  typing
  350.           'DSCAR'  (without  the quotes)  at the Dos prompt.  If you cloned
  351.           your configuration to a different filename  than  'dSCAR',  enter
  352.           that filename instead.
  353.  
  354.           You  will  then  be  prompted for the dBASE file that you wish to
  355.           process.  When entering the filename,  an extension  of  .PRG  is
  356.           assumed.  If  your  file  has  a  different  extension than this,
  357.           specify it.  If there is no extension,  place  a  dot  after  the
  358.           filename anyway so that dSCAR will not add the default .PRG.
  359.  
  360.           Path names are supported.  Up to 80 characters may be entered for
  361.  
  362.  
  363.  
  364.  
  365.                                     Page 7   
  366.  
  367.           the filename so that you can specify the directory it is in.
  368.  
  369.           If  a  valid filename is entered and the file exists,  a menu bar
  370.           will appear across the top line of the display.
  371.  
  372.  
  373.           -The Menu-
  374.           ----------
  375.  
  376.           NOTE:  The menu colors will appear different depending on whether
  377.                  you  are  using  a  color  or  monochrome  screen.   dSCAR
  378.                  automatically determines which type  of  display  you  are
  379.                  using   and   adjusts  the  colors  accordingly.   If  you
  380.                  experience problems with this adjustment,  let me know and
  381.                  I'll work something out for you.
  382.  
  383.           First,  we'll  define  the different parts of the screen.  On the
  384.           top line we  have  the  menu  bar,  which  contains  the  options
  385.           available to select and de-select.
  386.  
  387.           Next,  we  have the status line towards the bottom of the screen.
  388.           This line displays the name of the  program  (dSCAR),  the  copy-
  389.           right notice, and the dBASE file to be processed.
  390.  
  391.           Below the status line is the help line.  This will contain a one-
  392.           line  description  of  the  option currently selected on the menu
  393.           bar.
  394.  
  395.           The menu of options is almost  completely  self-explanatory,  but
  396.           some  explanation may still be needed.  Here is a quick review of
  397.           what the options do:
  398.  
  399.           Go!        - Begin processing of file using set options
  400.  
  401.           Controls   - Displays control lines only
  402.  
  403.           Diagram    - Diagram program flow
  404.  
  405.           Errors     - Display errors only -- no source listing
  406.  
  407.           Output     - Toggles the output device: screen, printer, or disk
  408.  
  409.           Modules    - Processes modules called by current module
  410.  
  411.           Numbering  - Adds line numbers to source output
  412.  
  413.           X-Ref      - Variables cross-reference
  414.  
  415.  
  416.           To toggle any of these options,  highlight it  using  the  cursor
  417.           keys  or by pressing the first letter of the option  (such as 'X'
  418.           for X-Ref), then hit the <return> key.
  419.  
  420.           The Output option is selected a little  bit  differently,  as  is
  421.  
  422.  
  423.  
  424.  
  425.                                     Page 8   
  426.  
  427.           explained below in the Output section.
  428.  
  429.           MONOCHROME  MONITOR  USERS:  Selected  options  appear  as bright
  430.              video.  If the cursor is on a selected option, the cursor will
  431.              blink.
  432.  
  433.           COLOR MONITOR USERS:  Selected options appear as yellow  on  blue
  434.              text.  If the cursor is on a selected option,  it is yellow on
  435.              gray text (as opposed to the normal cursor of white on grey).
  436.  
  437.  
  438.           -Quitting dSCAR-
  439.           ----------------
  440.  
  441.           Quitting dSCAR is accomplished by pressing Q or <Esc> (the Escape
  442.           key).  At this point you  are  again  asked  for  a  filename  to
  443.           process.  If  you are completely done with dSCAR and have no more
  444.           files to process,  hit <return> to exit to Dos  (or  the  calling
  445.           program).
  446.  
  447.  
  448.           -Diagram Program Flow-
  449.           ----------------------
  450.  
  451.           One  of  the most useful features of dSCAR is its ability to line
  452.           up all your control statements to make sure they are structurally
  453.           sound.  This makes it easy,  for example,  to see where you might
  454.           have an open CASE or a missing IF.
  455.  
  456.           The  resulting  output  with  Diagramming on would look something
  457.           like this:
  458.  
  459.                store .t. to okay
  460.                do while okay
  461.                W    accept 'What is your name?' to myname
  462.                W    if upper(myname) <> 'JOE'
  463.                W   T    ? 'Only Joe is allowed access!'
  464.                W   T    cancel
  465.                W    else
  466.                W   F    ? 'Hello Joe'
  467.                W   F    do case
  468.                W   F    case myname = 'JOE'
  469.                W   F   1    ? 'JOE'
  470.                W   F   1    ? 'Welcome'
  471.                W   F    case myname = 'joe'
  472.                W   F   2    ? 'joe'
  473.                W   F   2    ? 'Not Welcome!'
  474.                W   F    otherwise
  475.                W   F   O    ?
  476.                W   F   O    cancel
  477.                W   F    endcase
  478.                W    endif
  479.                enddo
  480.  
  481.  
  482.  
  483.  
  484.  
  485.                                     Page 9   
  486.  
  487.           Notice that each control statement has a corresponding  character
  488.           to represent it.  For example, a WHILE structure is lined up with
  489.           a W.  Below is what each characters represents:
  490.  
  491.                W  - DO WHILE; terminates with ENDDO
  492.  
  493.                T  - IF is true; terminates with ENDIF or ELSE
  494.  
  495.                F  - ELSE is false; terminates with ENDIF
  496.  
  497.                C  - DO CASE; terminates with first CASE, OTHERWISE, or
  498.                     ENDCASE
  499.  
  500.                #  - Number of the case statement; terminates with next
  501.                     CASE, OTHERWISE, or ENDCASE
  502.  
  503.                O  - OTHERWISE; terminates with ENDCASE
  504.  
  505.           If  you  don't  quite understand these,  try running some of your
  506.           dBASE code through dSCAR with Diagramming on and I  think  you'll
  507.           get the picture.
  508.  
  509.  
  510.           -Control Only-
  511.           --------------
  512.  
  513.           This  option tells dSCAR to only include the control lines in the
  514.           output.  These control lines would be commands like DO CASE,  IF,
  515.           OTHERWISE,  ENDIF,  etc.  This  option  is  especially  useful in
  516.           conjunction with the Diagram function.
  517.  
  518.           The purpose of this is to quickly see if  your  program  flow  is
  519.           correct without having to look at all the other extraneous code.
  520.  
  521.           -Errors Only-
  522.           -------------
  523.  
  524.           With Errors Only on, only errors that are found in the dBASE code
  525.           are  displayed.  These errors can be of many types.  See Appendix
  526.           B for a listing of error messages.
  527.  
  528.           When selected, Line Numbering, Control Only,  and Diagramming are
  529.           automatically turned off.
  530.  
  531.  
  532.           -Line Numbering-
  533.           ----------------
  534.  
  535.           Line  Numbering on will add line numbers to your source code.  If
  536.           Variable Cross-Reference is on,  then  I  suggest  to  have  Line
  537.           Numbering   on,   as   the  variables  are  referenced  with  the
  538.           corresponding line numbers.
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.                                     Page 10 
  546.  
  547.           -Modules-
  548.           ---------
  549.  
  550.           Modules will instruct dSCAR to process all modules that may  call
  551.           each  other  in  a  complete  dBASE  system.  Anytime dSCAR comes
  552.           across a DO <filename>,  it will add the filename to  a  list  of
  553.           modules  to  be  processed.  Thus,  if you had several modules to
  554.           process,  and they are all eventually  called  somewhere  in  the
  555.           system,  you could start with the main module and dSCAR will work
  556.           from there.  To illustrate this:
  557.  
  558.                You  have  the   module   called   MAIN.PRG,   which   calls
  559.                ACCOUNTS.PRG  and  INVENT.PRG.
  560.  
  561.                ACCOUNTS.PRG  in  turn  calls EDIT.PRG,  and INVENT.PRG also
  562.                calls EDIT.PRG.
  563.  
  564.                If you turn Modules on and start  with  the  file  MAIN.PRG,
  565.                then   all   of   these   would  get  processed:   MAIN.PRG,
  566.                ACCOUNTS.PRG, INVENT.PRG, and EDIT.PRG.
  567.  
  568.           A module will NOT be processed twice!
  569.  
  570.           The current module being processed is written on the command line
  571.           where the main file was.  Thus,  it is easy to see  what  modules
  572.           have errors in them with a glance at the status line.
  573.  
  574.           Depending  on  what  you  specified  in the configuration,  drive
  575.           designators and path names will or  will  not  be  stripped  from
  576.           filenames.  If  a  file  cannot  be found,  no matter where it is
  577.           looking, it is merely skipped.  No error message is displayed.
  578.  
  579.           dSCAR will also look for  SET  PROC  TO  <filename>  and  process
  580.           procedure files, too.
  581.  
  582.  
  583.           -Variables Cross-Reference-
  584.           ---------------------------
  585.  
  586.           Variables  Cross-Reference is a cross-reference of variables in a
  587.           file.  If this is used, Line Numbering should be turned on also.
  588.  
  589.           The resulting listing of the variables contains the variable name
  590.           and the line numbers it occurs in.  Simple as that!
  591.  
  592.           Each procedure gets its own cross-reference.
  593.  
  594.           If  Modules  is  on,  also,  then  a  global  cross-reference  of
  595.           variables  will also be made.  The global cross-reference quickly
  596.           shows which variables occur in which files.  If it  occurs  in  a
  597.           procedure,  then the procedure name is displayed,  and the module
  598.           name is in parenthesis next to it.
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.                                     Page 11 
  606.  
  607.           -Output-
  608.           --------
  609.  
  610.           When <return> is  pressed  with  Output  highlighted,  an  output
  611.           device  name  in parenthesis next to the word 'Output' is toggled
  612.           between three devices.  These are screen, printer, and disk, with
  613.           screen being the default.  Each of these is explained in  further
  614.           detail:
  615.  
  616.           SCREEN:  Everything  goes to the screen.  When the screen is full
  617.              you can press <return> to see the next page,  or hit the Q key
  618.              to exit back to the main menu.
  619.  
  620.  
  621.           DISK:  Output  to a file is good for formatting your code to make
  622.              it easier to read.  To get an output readable by  dBASE,  turn
  623.              OFF  Line Numbering,  Diagramming,  Errors Only,  and Controls
  624.              Only.
  625.  
  626.              When output to a file is selected,  the resulting output  file
  627.              is filename.FLO.  The original file is left unchanged.
  628.  
  629.              If  Variables Cross-Reference is on,  then the cross-reference
  630.              goes to a file named filename.XRF.
  631.  
  632.              And if Variables Cross-Reference and Modules is on,  then  the
  633.              global  cross-reference  goes to a file called GLOBAL (with no
  634.              extension).
  635.  
  636.              IF ANY OF THESE FILES ALREADY EXIST ON THE DISK,  THEY WILL BE
  637.              OVERWRITTEN WITH NO WARNINGS!
  638.  
  639.              Example:
  640.  
  641.                 Original file     :  MAIN.PRG
  642.                 Processed file    :  MAIN.FLO
  643.                 X-Reference file  :  MAIN.XRF
  644.                 Global X-Ref file :  GLOBAL
  645.  
  646.  
  647.           PRINTER:   The  printer  option  is  excellent  for  printing  up
  648.              documentation when your dBASE system is all  done.  I  suggest
  649.              turning  on  Diagramming,  Line  Numbering,  Variables  Cross-
  650.              Reference,  and Modules to print out  the  whole  system  with
  651.              complete  documentation,  including  variables cross-reference
  652.              and global cross-reference.
  653.  
  654.              All pages will be numbered when output goes to the printer.  A
  655.              table of contents is printed if Modules is on.
  656.  
  657.           If a printer is not hooked up to the computer,  or  is  off-line,
  658.           then  Output  only  toggles  between Screen and Disk,  making the
  659.           printer inaccessible.  As soon as the printer is ready,  you  are
  660.           able to select it as the output device.
  661.  
  662.  
  663.  
  664.  
  665.                                     Page 12 
  666.  
  667.  
  668.  
  669.           -GO!-
  670.           -----
  671.  
  672.           To begin processing with the desired options,  just press the 'G'
  673.           key, or highlight 'GO!' and hit <return>.
  674.  
  675.           If output is to printer, be sure the printer is hooked up and on-
  676.           line.  If output is to a file,  make sure there  is  enough  free
  677.           space on the current drive to handle the new files.
  678.  
  679.  
  680.           -Additional Modules-
  681.           --------------------
  682.  
  683.           If  you  have  modules  to  process  that are not called by other
  684.           modules,  there is a way to process these in a batch-type method.
  685.           Or, you might have a section of dBASE code that looks like this:
  686.  
  687.                DO FILE&X
  688.  
  689.           The  filename  to  be processed depends on the X variable.  dSCAR
  690.           would try to process the file called FILE&X and,  as you can see,
  691.           fail to find the file!
  692.  
  693.           To  process this file you could create a text file called MODULES
  694.           and put in it all  the  files  you  want  to  be  processed  that
  695.           wouldn't normally be processed.  dSCAR will look for this file IF
  696.           Modules is on.
  697.  
  698.           The stucture of the file MODULES should be one filename per line,
  699.           with each line separated by a carriage return.  This  file  could
  700.           be  created  with  your word processor or text editor in the non-
  701.           document mode.  Or you  could  create  the  file  using  the  Dos
  702.           command  COPY  CON  MODULES.  Enter  each  filename and when done
  703.           press your F6 key (or Ctrl-Z) and then the <return> key.
  704.  
  705.           The file MODULES (no extension) should come out looking something
  706.           like this:
  707.  
  708.                FILE1.PRG
  709.                FILE2
  710.                FILE10.XYZ
  711.  
  712.           Get the idea?
  713.  
  714.           Even if dSCAR does come across a DO <filename> and  the  filename
  715.           is in the MODULES file list, it will NOT be processed twice.
  716.  
  717.           NOTE: Remember to delete your MODULES file when you are done with
  718.                 it. dSCAR does not delete it for you.
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.                                     Page 13 
  726.  
  727.           -Batch Mode-
  728.           ------------
  729.  
  730.           There  is  another  way  to  invoke  dSCAR besides just by typing
  731.           DSCAR from Dos.  You can  also tag on a filename to  the  command
  732.           line, and some options if wanted.
  733.  
  734.           If  a  filename  is  included  then  dSCAR will skip asking for a
  735.           filename when it starts up.  Example:
  736.  
  737.                DSCAR MAIN.PRG
  738.  
  739.           The extension did not have to be included,  as .PRG  is  assumed.
  740.           dSCAR  would  start up and automatically use MAIN.PRG as the file
  741.           to process.
  742.  
  743.           You can also specify options to use from  the  command  line.  If
  744.           this  is  done  then  dSCAR  returns  to  Dos  when processing is
  745.           complete, and does not pause when a screen is full.  Thus,  dSCAR
  746.           works smoothly in Dos batch files.
  747.  
  748.           To  specify  the options,  include them after the filename (and a
  749.           space between the filename and  the  options).  The  options  are
  750.           just as you would specify from the menu.  To demonstrate:
  751.  
  752.                DSCAR MAIN FVMD
  753.                       |   ||||
  754.                       |   ||| \__Diagramming ON
  755.                       |   || \___Module Processing ON
  756.                       |   | \ ___Variables Cross-Reference ON
  757.                       |    \_____Ouput to File
  758.                        \_________File to process
  759.  
  760.           Notice  that the D in the options turned Diagramming on.  This is
  761.           due  to  the  fact  that  during  batch  operation  with   dSCAR,
  762.           diagramming is NOT turned on as a default!
  763.  
  764.           If  you wish to run dSCAR in auto mode but have NO options turned
  765.           on, specify an invalid option, like this: DLONE MAIN A
  766.  
  767.           'A' is not a valid option,  so dSCAR will ignore it but still put
  768.           you in auto mode.  I like to use 'A' because it is easy to relate
  769.           to the mode: Auto.
  770.  
  771.           Even  though  dSCAR  does  not  stop  after each page when screen
  772.           output is  selected,  you  can  still  abort  this  operation  by
  773.           pressing your 'Q' key.  You may have to hold it down, as dSCAR is
  774.           not very sensitive to keypresses while it is processing files.
  775.  
  776.  
  777.           This is another feature that needs to be experimented with to get
  778.           full understanding.
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.                                     Page 14 
  786.  
  787.           -Limitations-
  788.           -------------
  789.  
  790.           There  are  only  a few limitations on dSCAR.  The biggest one is
  791.           probably that it can handle only so many variables for  a  cross-
  792.           reference.   If  you  find  major  garbage  in  your  listing  of
  793.           variables,  then you have probably reached the limit on allowable
  794.           variables.  If this occurs, call me and I might be able to help.
  795.  
  796.           Another  limitation is that all commands should be separated by a
  797.           space,  or you may end up with some wierd variables in the cross-
  798.           reference.  Let's  say  you  have  a  line  of  code  that  reads
  799.           something like this:
  800.  
  801.             If Name = Your_Name.or.Name = His_Name
  802.  
  803.           Your_Name.or.Name will be treated as one  variable.  It  can  not
  804.           interpret the .OR. statement between the two variables.  This, on
  805.           the other hand, is okay:
  806.  
  807.             If Name=Your_Name .or. Name = His_Name
  808.  
  809.           dSCAR will separate Name and Your_Name, no problem.  You may have
  810.           to  do  a  little  experimenting  to determine what dSCAR can and
  811.           cannot handle.  I think you'll find that it  will  work  fine  on
  812.           most code you have written.
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.                                     Page 15 
  846.  
  847.           
  848.  
  849.           -Appendix A: Reporting Problems-
  850.           --------------------------------
  851.  
  852.           The steps to be taken before reporting an error are as follows:
  853.  
  854.                1) Read  all  documentation  to  make  sure  it is not  YOUR
  855.                   problem.
  856.  
  857.                2) Try re-configuring dSCAR.
  858.  
  859.                3) Get rid of all other programs that are in memory or  were
  860.                   loaded   at  boot-time  and  see  if  the  problem  still
  861.                   persists.
  862.  
  863.                4) Call me or my BBS system or write (these numbers and  the
  864.                   address  are  listed  above!)  and  tell me of the error,
  865.                   where it occurs, and under what circumstances.  I will be
  866.                   more than happy to help and appreciative of your  efforts
  867.                   in tracking down the bugs in my program!
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.                                     Page 16 
  906.  
  907.           
  908.  
  909.           -Appendix B: Error Messages-
  910.           ----------------------------
  911.  
  912.           dSCAR  traps many errors that may occur in dBASE code.  The below
  913.           summarizes the various error messages and explains the  meanings,
  914.           if needed:
  915.  
  916.                DO CASE not followed by CASE
  917.  
  918.                DO with no program name
  919.  
  920.                ELSE without IF
  921.  
  922.                Empty DO CASE
  923.  
  924.                ENDCASE without DO CASE
  925.  
  926.                ENDDO without DO WHILE
  927.  
  928.                ENDIF without IF or ELSE
  929.  
  930.                Follows LOOP - never executed -> Statement following LOOP is
  931.                  never processed by dBASE
  932.  
  933.                Follows RETURN never executed -> Statement following  RETURN
  934.                  is never processed by dBASE
  935.  
  936.                Missing DO CASE statement  -> CASE with no DO CASE
  937.  
  938.                Open DO CASE from line x
  939.  
  940.                Open DO WHILE from line x
  941.  
  942.                Open IF from line x
  943.  
  944.                Open TEXT from line x
  945.  
  946.                Redundant  LOOP  statement  ->  LOOP  occurs  just before an
  947.                  ENDDO, so would be processed many times
  948.  
  949.                SET PROC not followed by TO
  950.  
  951.                Unexpected ENDTEXT  -> No TEXT to match the ENDTEXT
  952.  
  953.                Warning:  At most 1 iteration -> A RETURN  occurs  within  a
  954.                  loop, so loop would only last for 1 iteration
  955.  
  956.                WITH   expected,   but  not  found  ->  Words  following  DO
  957.                  <filename> are ignored unless it is WITH <variables>
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.                                     Page 17 
  966.  
  967.           
  968.  
  969.           -Appendix C: Future Enhancements-
  970.           ---------------------------------
  971.  
  972.           These are the many features I'd still like to add to dSCAR:
  973.  
  974.              o Maybe  re-write  in  Modula.  I  understand  it  is a  great
  975.                language (especially when coming from a  Pascal  background)
  976.                and  I currently have Interface Technologies Modula-2 (SDS),
  977.                but  waiting  for  an  update.   Would  rather  do   it   in
  978.                Logitech's, as I hear it is SSSOOO much better!
  979.  
  980.              o Number  of  cross-referenced  variables  only  dependent  on
  981.                memory.  I'm hoping Modula will make it easier to do than it
  982.                is in Pascal.
  983.  
  984.              o Faster!  Again,  I'm partly relying on Modula to  cure  this
  985.                problem.  I  do  know  of  some code changes that would help
  986.                speed-up dSCAR,  but that would require a total re-write  in
  987.                the current language I am using!
  988.  
  989.              o User-specified colors.  Adding color options is hard  for me
  990.                to  do,  as  I  only  have  a  Hercules  display  card  with
  991.                monochrome monitor.  Maybe someday, though...
  992.  
  993.              o  Smaller.  Probably another re-write...
  994.  
  995.              o Code  stripper.  Give  dSCAR  the  ability to strip  out un-
  996.                necessary spaces,  tabs,  comments,  and break all  commands
  997.                down  to  their  4-letter  equivalents (i.e.  APPEND becomes
  998.                APPE).   This  could  be  added  fairly  easily,  but  would
  999.                probably have to go to overlays (which I don't want to do).
  1000.  
  1001.              o Anything anyone suggests!!  Throw your ideas &  comments  at
  1002.                my way.
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.                                     Page 18 
  1026.  
  1027.           
  1028.  
  1029.           -Appendix D: About Me & My Program & My Help-
  1030.           ---------------------------------------------
  1031.  
  1032.           I,  Ryan  Katri,  am  a  student  on  a LOW budget.  You wouldn't
  1033.           believe how low my budget is!!  That is why I am asking you  (the
  1034.           user  of  my  program)  to  support the User-Supported concept of
  1035.           software distribution;  it will increase  my  time  available  in
  1036.           designing and writing quality programs like dSCAR,  as I will not
  1037.           have to do other work!
  1038.  
  1039.           dSCAR started out as a project to test my just-learned skills  as
  1040.           a  Pascal  programmer.  The  resulting  program  turned  out much
  1041.           bigger than I originally anticipated.  One feature I had  planned
  1042.           for  dSCAR  had to be left out because I could not figure out how
  1043.           to do this certain thing in Turbo Pascal.  It was not Turbo  that
  1044.           kept  me  from  putting  the  feature  in,  but  was  my  lack of
  1045.           sufficient knowledge.  Sorry!
  1046.  
  1047.           I have not separated dSCAR into overlays,  as you will notice.  I
  1048.           almost refuse to do it,  also!  My reasoning behind this decision
  1049.           is that if you run dSCAR from a different directory than what  it
  1050.           is in, it would not be able to find the overlays in most cases!
  1051.  
  1052.           A little more inside information behind the economics of dSCAR:
  1053.  
  1054.           I  was thinking about selling dSCAR for $20,  but decided against
  1055.           this, as I cannot afford the advertising needed.
  1056.  
  1057.           Therefore,  I distributed dSCAR using the User-Supported concept.
  1058.           This  way  I  get free distribution and maybe a handful of people
  1059.           will be generous enough (and  honest  enough)  to  send  me  some
  1060.           reimbursement for my efforts.
  1061.  
  1062.           There  you got it.  A history of dSCAR--sort of.  Now a few words
  1063.           of thanks to:
  1064.  
  1065.                Gene Head for beta-testing and actually reporting  problems!
  1066.                Not only that, Gene is responible for getting me 'hooked' on
  1067.                computers,  and therefore takes the blame for screwing up my
  1068.                life!
  1069.  
  1070.                Michael Bosen for donating to me a copy of Turbo Pascal (no,
  1071.                not pirated!) and  also  recognizing  the  importance  of  a
  1072.                screen-install program!
  1073.  
  1074.                Dan Hankison and Bruce Bott for going beyond their duties as
  1075.                beta testers by providing  advice  and  suggestions  in  the
  1076.                overall look, feel, and function of dSCAR.
  1077.  
  1078.                And  the  many others who have contributed to the success(?)
  1079.                or failure(?) of dSCAR.
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.                                     Page 19 
  1086.  
  1087.           
  1088.  
  1089.           -Appendix E: Disclaimer-
  1090.           ------------------------
  1091.  
  1092.           RYAN KATRI AND ANYONE INVOLVED IN THE  CREATION  AND  TESTING  OF
  1093.           dSCAR  SHALL  NOT  BE HELD RESPONSIBLE FOR ANY DAMAGE INCURRED BY
  1094.           THE USER TO  HARDWARE,  SOFTWARE,  OR  PERIPHERAL  DEVICES  WHILE
  1095.           RUNNING  dSCAR.  ALL  RESPONSIBILITY  LIES  WITH  THE USER OF THE
  1096.           SOFTWARE.
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.                                     Page 20 
  1146.  
  1147.           
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.