home *** CD-ROM | disk | FTP | other *** search
- Documentation for the program: PRETTY.EXE
-
- This program takes a Pascal source program as input and 'prettyprints' it:
- Conditional keyword blocks are indented. Indenting is compressed past
- a given point so as not to exceed an 80-character line width.
-
- Example source file
- if <condition> then begin <statement1> <statement2> end else <statement3>
- if <condition>
- then
- begin
- <statement1>
- <statement2>
- end
- else
- <statement4>
-
- Adapted by: Michael Shunfenthal Compuserve ID: 76320,122
-
- Usage: PRETTY [input_file] [output_file]
- If input_file or output_file are omitted, they will be requested.
- There are no default extensions; the full file names must be supplied.
- Standard pascal keywords are recognized, but not Microsoft/IBM or
- Turbo extensions, nor include files.
-
- The program has been adapted from the following source:
- Pascal With Style by H. Ledgard, published by the Hayden Book Co.
- Enhancements to the original program:
- 1. Fixed a bug in procedure skipspaces, initializing spacesbefore.
- 2. Recognizes two kinds of open and closecomment delimiters.
- 3. Substitutes a space for a tab in the input file.
- 4. Recognizes identifiers in any combination of upper or lowercase.
-
- { Future enhancements:
- 1. Recognize Microsoft/IBM or Turbo Pascal keywords.
- 2. Make the executable file smaller.
- 3. Make default input and output file types .PAS and .PRT, respectively.
- 4. Try, but so far unable, to port this program to turbo pascal.
- (... because turbo does not support get and put text-file
- read procedures.)
- 5. Adapt the keyword-recognition part for a wide range of languages.