home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
progbas
/
qblist.arj
/
QBLIST.DOC
< prev
next >
Wrap
Text File
|
1992-01-20
|
7KB
|
124 lines
Hello Qbasic or QuickBasic programmer
First the legal stuff.
----------------------
The listings and/or programs included in this Zip file are given into
the public domain to be used by anyone as they wish. No Warranty or Guarantee
implied or explicit is given. You are at you own risk. I do not want, nor do
I ask for any money to be sent to me.
NOTE: I do not touch the original files other then to read it. No
fancy screen writes or unusual programming is done so it should work on any
system or monitor. I do use the basic command COLOR 15,1 in the subroutine
SCREENTITLE as I have a color monitor. I tried this program on a cga yellow
monitor and it didn't seem to affect it in any way.
NOTE: Set you printer to 12 characters per inch, and 8 lines per inch.
See Special Notes at the end for details on changing the program.
Contents Of This Zip File
-------------------------
QBLIST.EXE -- The exe version of this program
QBLIST.BAS -- The Basic source code listing of this program
QBLIST.LST -- Sample output
QBLIST.DOC -- This Doc file
README.DOC -- For anyone who doesn't want to read this doc file
What This Program Does
----------------------
This program will give you a formatted listing of your complete basic
program with headings, or will print individual sections of your program when
you only need to work on a specific subroutine or function.
This program will read a Qbasic or QuickBasic program, which must be
saved in ASCII format, and print it to a disk file with the same name as the
original, but with the extension of LST instead of BAS. It should look like
the same way you wrote it with the changes as described below. It will print
a two line heading with the first line being program name, date, time, and
page number. The second heading line will consist of one of three possible
headings. One (1) the Main Module which is usually the beginning of a
program. This will be the same name as the program. Two (2) SubRoutine name.
Three (3) Function name. In each case you will see in parenthesis what you
are looking at. Also there is an individual page number for all each routine.
The program will start a new page for every Subroutine or Function. Any line
that is longer than eighty (80) characters is split into two (2) line, the
second line will have <<*>> before to show that it was split. I assume no
line will be greater than one hundred and sixty characters (160).
How This Program Work
---------------------
Copy QBLIST.EXE to the directory where you keep your basic programs.
the program will only write to the same directory that it is in. Type QBLIST
then press return. A menu will ask you what program you want to list. type in
the name with out the Bas extension. The next menu will give you five (5)
options.
Option One (1) Complete -- This will print a complete list of your program.
Option Two (2) Main Module -- This will print the only the beginning of your
program.
Option Three (3) SubRoutine -- This will print any SubRoutine that you want.
Another screen will ask you for the name of
the SubRoutine or you can key in L or the
whole word List and you will be given a list
of all the SubRoutines in the program.
Option Four (4) Function -- This works the same as Option 3 but for Functions
Option Five (5) Quit -- This will end the program.
In all cases please key in the number of an option. Every time your run this
program it will overwrite the previous file with the same name. Therefore
after you run this program use the command COPY FILENAME.LST LPT1, this will
then print your listing. I did it this way so that you can look at the
program with a ascii viewer or print it from the disk instead of waiting for
the printer.
See special notes below for modification that you can make.
Special Notes About The Program
-------------------------------
I don't have a laser printer so I don't know how this program will
work with one.
This program assumes that you can manually change you printer to 12
characters per inch at 8 lines per inch. I've done this because this gives me
ten spaces to the left of the listing for my hole puncher so that I can put
the listing in a standard size 3 hole binder. For any lines that are greater
than eighty (80) characters it is easy to see the <<*>> notation. Also my dot
matrix printer prints nicely this way. And since every printer works
differently I don't have to worry about special print codes.
To change this take out the (3) three TAB(10) instructions from the
WriteLine subroutine.
If you don't like the 8 lines per inch change 82 to 62 in the
WriteLine subroutine.
If want to print directly to the printer change all the PRINT statements
to LPRINT in the Following SubRoutines: WriteLine, ProgramTitle, SubTitle
The program checks each line to see if it is greater than eighty (80)
characters. If it is looks for the last blank space on the line and prints
the second line from that point on. I have noticed that some DATA statements
have spaces after each comma in that case there is no problem. If there are
no spaces you will note that the word DATA goes on one line and the rest goes
on another. This is because the only space is after the word DATA.
The one major flaw to this program is, when there are REMARK line
before a Subroutine or Function. I don't how Qbasic or QuickBasic keeps track
of each subroutine or function. Some programmers put remark or defint or any
other statements before a subroutine or function. This is fine when you are
using Qbasic or Quickbasic. The flaw in this program is that I look for the
word SUB or FUNCTION to start a new page. Therefore anything that precedes a
subroutine or function will show up on the previous page when you as for a
complete listing of the program, and will not show up if you request a
partial listing. If anyone has any ideas to get around this please contact
me.
Contact Me
----------
I would greatly appreciate any comments, suggestions, or problems that
you encounter with this program.
I can be contacted on the INVENTION FACTORY BBS at (212) 431-1194.
Leave me a message. Or you can write to me directly at the address below.
SOLOMON EINHORN
901 AVE H APT. 3J
BROOKLYN, NY 11230