home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / a / dbindent.lbr / DBINDENT.DZC / DBINDENT.DOC
Encoding:
Text File  |  1993-10-26  |  6.5 KB  |  189 lines

  1.              DBINDENT DOCUMENTATION
  2.  
  3.            For Version 1.00   2-18-85
  4.  
  5.            (C) 1985 by Merlin R. Null
  6.  
  7.  
  8.      The purpose of DBINDENT is to change the  indentation  of  a
  9. dBASE II command file and send the output to the screen, printer,
  10. file or any combination  of  these.   Any  value  of  indentation
  11. between 0 and 9 columns may be used.  This allows more freedom of
  12. choice than is offered with most pretty  printers.   Usually, the
  13. author's ideas of pretty printing are imposed on the user.  It is
  14. useful for creating a better looking file than one  generated  by
  15. DBSOURCE.   DBSOURCE  will produce  a  file  with  no  indenting.
  16. DBINDENT should have been included  with  DBSOURCE.LBR,  but  the
  17. library grew too large.
  18.  
  19.  
  20.             Library Contents
  21.  
  22. DBINDENT.LBR should contain the following files:
  23.  
  24. DBINDENT.COM    Stand alone compiled MBASIC
  25. DBINDENT.BAS    The MBASIC source
  26. DBINDENT.HLP    A help file readable from DBINDENT
  27. DBINDENT.DOC    This documentation
  28. DBINDENT.CRC    CRC list for verification
  29.  
  30. **********    DBINDENT.COM is a stand alone file.
  31. *  NOTE  *    If you have BASCOM and wish to save
  32. **********    disk space, recompile the source for
  33.         use with BRUN.COM.
  34.  
  35.  
  36.               Installation
  37.  
  38.      The first time you run DBINDENT, you will be asked for  the
  39. the decimal values of your clear screen sequence.  This is  used
  40. to write CLS.DAT, the data file that holds your terminals  clear
  41. screen information.  If it is installed  correctly,  you  should
  42. then see the clear screen work and the start of the program.  If
  43. you get scrolling instead, kill CLS.DAT and try again.   If  you
  44. prefer scrolling instead of a clear screen, enter the  number 10
  45. for each blank line you want when DBINDENT changes  screens.   A
  46. Maximum of 9 are allowed.  Example if your clear screen sequence
  47. is ^Z or ASCII character 26:
  48.  
  49. Clear screen character 1 ? 26
  50. Clear screen character 2 ? <RETURN>
  51.  
  52.      
  53.         
  54.                Line Length
  55.  
  56.      DBINDENT does no checking of line length,  so  lines  longer
  57. than your  console  or  printer  will handle  will be wrapped. If
  58. these  lines are longer than  80 columns, you will not be able to
  59. modify the command file with  dBASE II, as dBASE amputates  lines
  60. at 80 columns.  Make any needed changes with a word processor, if
  61. this is the case.  dBASE will run programs with lines longer than
  62. 80 columns.
  63.  
  64.  
  65.                  Errors
  66.  
  67.      DBINDENT  does  check  for  proper closing of loops.  If you
  68. have one to many  END  statements in the file, DBINDENT will stop
  69. and show you the line  where the last ENDIF, ENDDO or ENDCASE was
  70. used  along with the  line count  to that  point.  This will only
  71. happen if the END statement would call for negative  indentation.
  72. DBINDENT checks  for proper  matching of totals  of the following
  73. pairs: IF and ENDIF, DO WHILE and ENDDO, DO CASE and ENDCASE.  At
  74. the end of processing you may get an error message like:
  75.  
  76. *** WARNING *** This file has the following errors:
  77. 1 - DO CASE without ENDCASE
  78. 1 - ENDDO without DO WHILE
  79. No files changed
  80.  
  81.      This would probably mean that  you  used  an ENDDO where you
  82. should  have  used an  ENDCASE.   If you use the P (Print) option
  83. with a file with a termination  error, it  will still give you an
  84. indented  printout.  It will terminate  early  only  if  negative
  85. indentation is called for.  If you find the error hard to locate,
  86. get another printout with an indentation value of 8.
  87.  
  88.      DBINDENT does not check for proper nesting of loops.  If you
  89. cross  loop  lines  and  have  the  proper  number of terminators
  90. of each type,  DBINDENT  will  accept  that  as  correct.  Visual
  91. examination of the resulting printout should show the problem.
  92.  
  93.  
  94.                  Options
  95.  
  96.         P        Send output to Printer
  97.         F        Send output to File
  98.         N        No console output
  99.         1-9        Value to indent (default=2)
  100.         0        Remove all indenting
  101.  
  102.  
  103.                No option specified
  104.  
  105.      Without an option  specified, the output will go only to the
  106. console  with  an  indentation  value  of  2.   No  files will be
  107. generated or changed.
  108.  
  109.  
  110.             Numbers with the options
  111.  
  112.      Adding a numeral with  the  options  or  as  a  sole  option
  113. changes the default value (2) of the indentation. Values  may  be
  114. between 0 and 9.  0 produces a file  without  indentation.   This
  115. might be useful if you want  to  produce  a  slightly  compressed
  116. file.  With heavy nesting of loops a large number of bytes can be
  117. tied up in indentation.  If more than one number is  included  in
  118. the option field, only the first one will be used.
  119.  
  120.  
  121.              Send output to Printer
  122.  
  123.      The  P option sends the output to the printer.  Used  alone,
  124. the P option will not change any disk files.  It  will  produce a
  125. pretty printed listing of a file  for  any  original  indentation
  126. value.
  127.  
  128.  
  129.                Send output to File
  130.  
  131.      The  F  option produces a new, pretty printed, file with the
  132. same name as the input  file.  The input file is  renamed  with a
  133. .BAK extension.
  134.  
  135.  
  136.             No console output
  137.  
  138.      The N option shuts off the normal presentation of the output
  139. file on the console.  This helps speed up generation of a file or
  140. printing of the output.  It can not be used unless the F or P
  141. options are used.
  142.  
  143.  
  144.              Abbreviations and Case
  145.  
  146.      DBINDENT looks for only the first four letters  of  reserved
  147. words as does dBASE II.   Lower  case  reserved  words  are  also
  148. allowed, although  this is contrary to programming  standards for
  149. dBASE suggested by most authors.
  150.  
  151.  
  152.                 Help File
  153.  
  154.      The help file may be called from DBINDENT by entering a "?"
  155. at the title screen.
  156.  
  157. Filename.SRC/.CMD or Drive:? ?
  158.  
  159.  
  160.               LEGAL NOTICE
  161.  
  162. DBINDENT  is  NOT  "Public Domain."   Copyright  is  held  by the
  163. author:
  164.  
  165.             Merlin R. Null
  166.             P. O. Box 9422
  167.             N. Hollywood, CA 91609
  168.             (818) 762-1429
  169.  
  170.      Permission is  given  only for  private,  nonprofit  use  of
  171. DBINDENT.  Feel free to make copies of the program  for your  own
  172. use or for your friends.  However, DBINDENT  may NOT  be sold  or
  173. included with any collection of programs for sale or used  as  an
  174. inducement to buy another product or program without the  written
  175. permission of the author.  Permission is also given for nonprofit
  176. computer  clubs to include this  program in  distribution  disks,
  177. provided  total charges  for the entire disk of programs, copying
  178. and shipping do not exceed $20.00.  My vote  of  thanks  goes  to
  179. those clubs that have kept their charges under $10.00.
  180.  
  181. MBASIC and BRUN are Trademarks of Microsoft
  182. dBASE II is a Trademark of Ashton-Tate
  183. rom DBINDENT by entering a "?"
  184. at the title screen.
  185.  
  186. Filename.SRC/.CMD or Drive:? ?
  187.  
  188.  
  189.