Dec 222017
 
A Basic source printer printer. Performs indentation.
File QBFMT.ZIP from The Programmer’s Corner in
Category BASIC Language
A Basic source printer printer. Performs indentation.
File Name File Size Zip Size Zip Type
QBFMT.BAS 12437 4463 deflated
QBFMT.DOC 1954 848 deflated
QBFMT.EXE 51656 36039 deflated
TPCREAD.ME 199 165 deflated

Download File QBFMT.ZIP Here

Contents of the QBFMT.DOC file


This program will reformat QuickBASIC modules by indenting the lines
according to the structure of the statements. For example, all lines found
between matching DO and LOOP statements will be indented a number of columns
more than the DO and LOOP statements. Of course, nested structures are
indented even further.

At the same time as the program is reformatting the module, it will
break apart any multiple statements that appear on the same line and that are
separated by a colon. However, the program is smart enough to realize that
a single line IF THEN structure cannot be broken apart without extreme care,
so this structure will not be separated.

One advantage of processing a file with this program is that improperly
matched statements are detected. Improper matching can happen if, for
example, you forget to type an END IF statement to match an IF statement. A
special comment line is placed in the file at the point where the error is
detected. The program will also cue you audibly when such an error is
detected.

QuickBASIC programs to be processed by this program must be saved in
text format and have the extension .BAS. To use the program, the command
line should be entered in the following format:

QBFMT filename(.BAS) [first-tab] [indentation]

where filename is the name of the QuickBASIC module
first-tab is the location of the first level of indentation
(default is column 8)
indentation is the level of indentation for successive structures
(default is 3)

The program will place line labels (symbolic AND numeric) flush with the left
margin. It will also place lone comments flush with the left margin. All
other lines will be indented according to structure.

The source code is included with this package, so you may modify the
program to meet your particular desires.



 December 22, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)