home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
dbpretty.zip
/
PRETTY.DOC
< prev
Wrap
Text File
|
1987-02-14
|
3KB
|
67 lines
PRETTY - FORMATTING PROGRAM FOR dBASE II COMMAND FILES
by
Joel Shapiro
August 13, 1984
The capability of formatting a dBASE command file so all
structured operations can be matched has proven to be helpful in
understanding and troubleshooting my programs.
Adam B. Green demonstrates and provides code for such a program
in his "Advanced dBASE II User's Guide" but the program lacks a
few features and, most important, is extremely slow. I hope my
version of the program takes care of both problems.
The purpose of this program is, using a dBASE II command file
(CMD) as a source, provide a file with the same program formatted
in a special manner. Specifically, the program formats as
follows:
All REMARK lines denoted with an asterisk (*) are printed in
lower case.
Lines between DO WHILE, DO CASE, IF and their terminators; ENDDO,
ENDCASE and ENDIF are indented three (3) additional spaces.
All characters except those between single quotes, double quotes
and brackets are capitalized.
Lines between TEXT and ENDTEXT keywords are printed exactly as
they appear in the file.
The program is written in BASIC/Z, a compiled basic from
System/z, Inc. and is provided in object code only. All run-time
code is contained in the COM file. To use, type: PRETTY <CR>.
When requested, enter the filename and drive. You don't have to
add the filetype as the program expects to find a CMD file.
You will the be asked to select a command file or print file
output. Selecting a command file will cause the formatted output
to be written to a file of the type ????????.NEW. Selecting a
print file output will provide a file of the type ????????.PRN.
Additionally, line numbers are added to each line in the PRN
file.
No provision has been made to split lines longer than a formatted
screen or printer line width. I suggest you use lines not
exceeding 60% (48 characters for an 80 column screen/printer)
which should format correctly.
Output files can be printed directly or enhanced with your word
processor.
Joel Shapiro
1