home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / PRETTY.ZIP / PRETTY.DOC next >
Encoding:
Text File  |  1987-03-16  |  1.6 KB  |  42 lines

  1. Documentation for the program: PRETTY.EXE
  2.  
  3. This program takes a Pascal source program as input and 'prettyprints' it:
  4. Conditional keyword blocks are indented.  Indenting is compressed past
  5. a given point so as not to exceed an 80-character line width.
  6.  
  7. Example source file
  8. if <condition> then begin <statement1> <statement2> end else <statement3>
  9. if <condition> 
  10.    then 
  11.       begin 
  12.          <statement1> 
  13.          <statement2> 
  14.       end
  15.    else
  16.       <statement4>
  17.  
  18. Adapted by: Michael Shunfenthal  Compuserve ID: 76320,122
  19.  
  20. Usage:      PRETTY [input_file]  [output_file]
  21. If input_file or output_file are omitted, they will be requested.
  22.    There are no default extensions; the full file names must be supplied.
  23. Standard pascal keywords are recognized, but not Microsoft/IBM or 
  24. Turbo extensions, nor include files.
  25.  
  26. The program has been adapted from the following source: 
  27.    Pascal With Style by H. Ledgard, published by the Hayden Book Co. 
  28. Enhancements to the original program:
  29. 1. Fixed a bug in procedure skipspaces, initializing spacesbefore.
  30. 2. Recognizes two kinds of open and closecomment delimiters.
  31. 3. Substitutes a space for a tab in the input file.
  32. 4. Recognizes identifiers in any combination of upper or lowercase.
  33.  
  34. { Future enhancements: 
  35. 1. Recognize Microsoft/IBM or Turbo Pascal keywords.
  36. 2. Make the executable file smaller. 
  37. 3. Make default input and output file types .PAS and .PRT, respectively.
  38. 4. Try, but so far unable, to port this program to turbo pascal.
  39.    (... because turbo does not support get and put text-file
  40.    read procedures.)
  41. 5. Adapt the keyword-recognition part for a wide range of languages.
  42.