Dec 282017
Programmer's file lister. Will print source code to the printer in a semi-formatted manner.
File SHORTQ.ZIP from The Programmer’s Corner in
Category Miscellaneous Language Source Code
Programmer’s file lister. Will print source code to the printer in a semi-formatted manner.
File Name File Size Zip Size Zip Type
SHORTQ.DOC 14806 5306 deflated
SHORTQ.EXE 59312 25906 deflated

Download File SHORTQ.ZIP Here

Contents of the SHORTQ.DOC file

SHORTQ Version 2.0

Yes, another file lister with features not found in any other:

* any file printed with optional LINE NUMBERS

* option to list any INCLUDE (.INC) files if Pascal source code

* page headers with page numbers, etc.

* print compression control for 8 popular dot-matrix
and laser printers

* sorted list of PROCEDURES and page no. where defined
(for .PAS files only)

* ditto for FUNCTIONS

* point and shoot at any file in ANY directory

* etc., etc., etc.

While SHORTQ will list any text file, it has been designed with the
professional computer programmer in mind.

The program uses the file name EXTENSION to determine what kind
of file it is printing. Based on this extension, several things can
happen, the most important of which is the HEADER at the top of each
printed page of source code (or other document) as shown next:

File Name Extension Page Header
-------------------- -----------

.PAS PASCAL Source Code
.C C Source Code
.FOR FORTRAN Source Code
.COB COBOL Source Code
.CBL COBOL Source Code
.PRG DBASE Source Code
.PRO PROLOG Source Code
.BAS BASIC Source Code
(any other extension) File/Documentation Listing
(no extension) File/Documentation Listing

* WARNING: When using this program to list BASIC source code *
* be sure that the file is an ASCII text file. This program *
* will get horrible indigestion if you attempt to list a *
* BASIC binary (or interpreted) file with it. *
* If you have a BASIC file in GW-BASIC, for example, SAVE *
* the file in GW-BASIC as SAVE"filename.bas",A. Putting the *
* ,A after the file name will save it as an ASCII text file *
* which you will still be able to read into GW-BASIC, but *
* SHORTQ will be able to read it and recognize the .BAS *
* extension so your page headers will be correct. *

The program begins by asking you to type in the name of the
file you wish to list to the printer. You can here type in the
name of any text file in the current directory. Use the backspace
key to edit as necessary, then press .

You can also type in wildcards here, such as *.* or *.PAS, etc.
In this case, a list of all files matching the wildcard are presented
on the screen. You just "point and shoot" at the file you want to list
(using arrow keys to point then press ). You can change
to another DIRECTORY/SUB-DIRECTORY by pointing and shooting at any
DIR listing that appear in the listing. (Only those directories
that are below the current directory will show in the list. See below
for methods of changing to other or higher directories.)

If you simply press at the filename prompt, the wildcard
*.* is assumed.

When you use a wildcard expression, you have at your disposal
a very powerful file manipulation tool.
Using the following "hot-key" combinations you can easily do
the following:

Alt-D sorts list of files in native DOS order
Alt-N sorts list of files alphabetically by name
Alt-E sorts list of files by extension
Alt-S sorts list of files by size
Alt-T sorts list of files by date/Time of creation
Alt-O toggles the sorting order (Ascending/Descending)

Alt-Z toggles the size of the window displaying the
list of files (short/long)

Alt-C change to a new drive/directory. Use the
backspace key to edit the directory at the
editing window that appears. A new list of
files from the new directory will appear in
the window.

Alt-B moves to the root directory of the current

Space Bar toggles display between just names of files
and file names with full details showing.

(For the Alt commands, hold down the key marked Alt and press
the other key shown at the same time.)

Pressing F1 will get you a help window on the screen showing you
this list of hot keys.

Once a file has been selected, you can choose whether you want line
numbers on your listing. Just press Y or N when asked on the screen.
The default response is N... you can just press to accept the default.

TURBO PASCAL FILES: If the file name ends with .PAS, you can choose
whether you want any Pascal "include" files listed along with
the main .PAS file. The include files MUST be referenced in the
main .PAS file as {$I MYFILE.INC}. (Contents of .TPU files are not listed.)
(See the technical note below about making include files "includeable" in
the listing.)

Next you get a list of printers. Move the pointer with the
arrow key until the printer you have or a close match is marked then
press enter. See the section "About Printers" below.

Finally, you can choose whether you want to select compressed print.
The program offers a choice of 4 "sizes" of compressed print:
Compressed (137 characters per line), Micron (120 characters per line),
Elite (96 characters per line) or Pica (80 characters per line). These are
conveniently selected from a list on the screen just like the list
of printers. (Note: Micron may not be supported by all printers.)

You also have the freedom in instantly abort using this program
at any of the stages shown above. Just press the key and you're
outta there.

the program will search your current directory for a filename with
a computer language extension.
First it looks for .PAS. If not found it continues searching
for the following extensions IN THE ORDER SHOWN HERE!!:

If you entered a wild card and used the point-and-shoot method to name
the file to be printed, then NO file searching will take place.

The search starts with .PAS and if it finds a file filename.pas will
print that file. If it doesn't find .PAS it next searches for .C and prints
filename.c if it finds it. It keeps searching thru the list of
extensions shown above. If you have files MYFILE.PAS and MYFILE.C
in the same directory, and you enter MYFILE as the name to print,
MYFILE.PAS will be printed. To get MYFILE.C printed, either
specify MYFILE.C at the input prompt, point to MYFILE.C and shoot,
move MYFILE.C to another directory or rename either file.

If you keep your files in a separate directory for each language you use,
you can go from directory to directory and enter "DEMO" as the filename
to print, and get DEMO.C, DEMO.PAS, DEMO.FOR and DEMO.COB printed simply
by typing in DEMO as the filename to print.


Once the Pascal listing is printed a sorted list of all your procedures
and functions are printed. Rather than cross-referencing all calls to
a procedure or function, this listing shows the page in the listing where
the procedure was defined or created. Where in the listing does it show:

Procedure MyProc;
begin ...

The sorted listing shows name of procedure, which file it is from
and the page number in the current listing:

MyProc...................(MYFILE.INC).............. 64

C files: C source code files will show proper indenting for the
all important { and } characters. This will occur even if your C
IDE editor does not insert spaces when you TAB in the editor.

Print files: Often text files designed to be printed with the DOS PRINT
command come with their own form feeds imbedded in the text at the end of
each "page." SHORTQ will skip over these imbedded form feeds and use its
own page making codes, along with page headers and appropriate margins. Files
prepared for use with PRINT often do not have a left margin or page headers.

The program is very easy to use. You just type SHORTQ (no command
line parameters in this one). If your printer is not on-line
or out of paper, etc., you'll get an error message and be told to run
SHORTQ again once your printer problems are resolved. After the filename is
entered or selected you answer the next questions with Y or N for "Yes"
or "No". Press at any question to abort running the program.

If you use SHORTQ you are asked to send a donation in any amount
($5.00 suggested minimum) to the author shown below. This will help
assure the continued output of quality software at bargain basement rates.

A deluxe version of SHORTQ is now available called FILEQ,
which will allow you to queue many files at a time for printing
and be able to have all SHORTQ features available for each file
in the queue.
FILEQ has such an extensive, indexed, cross-referenced online
HELP facility that there is no need for a manual or a
separate documentation file. It's screen functions make
SHORTQ look like a toy.


John A. Abele
114 Woodlawn Ave.
Willow Grove, Pa. 19090

A technical note about Turbo Pascal "include" files:

In Turbo Pascal source code you cannot have an "include" file listed if both
1 and 2 are true:

1. it has a filename beginning with the letter F;

2. you write the include compiler directive
with the F right next to the $I, such as

The problem is that SHORTQ has no way of knowing
whether you mean a file or a compiler directive
if it reads {$IFDEF}, {$IFNDEF} or {$IFOPT} in your
source code. Since these 3 are valid compiler
directives, there is room for conflict with
file names here.
There is NO PROBLEM having "include" filenames
starting with the letter F, if you
simply put a space after the I in the compiler
directive in your source code. This will get a file
named FOOFILE.INC listed with the source code:

^..............a space goes here

(assuming, of course, that a file named FOOFILE.INC exists )
About Printers:
SHORTQ offers you a list of 10 printer types (and the "other"):

HP LaserJet III
HP LaserJet II
HP Deskjet Plus
Okidata MicroLine series
Epson FX series
Epson LQ 2500 (which probably will handle the LQ series)
Panasonic KX-P series (KX-P1124, KX-P1624, etc.)
IBM ProPrinter X24
Okidata 2410 - the Pacemark series (the "tank")
Toshiba P351

The first three in the list are laser printers while the
others are all dot matrix line printers.

While most of these printers are fairly popular and a lot
of printer users are covered by this list, the problem still arises
what happens if the printer YOU are using is not on this list or covered
by one of these series of printers? First, SHORTQ only needs to know
which printer you have in the event you want to print in one of the
compressed print modes. The one exception to this is if you are using
the HP LaserJet II series of printers. LaserJet requires a little bit of
setup even if you are not printing compressed. So if your printer is
not on the list and you're not going compressed, select "Other".
If your printer is not on the list and you are going compressed, try "Other"
and see if it works. Other will try a "best guess" approach to print
compression. If you don't get satisfactory results with Other, try one of
the others, starting with Epson FX. (Hint: You might try upgrading
to FILEQ.)

We would dearly love to present you with a list of printers
like you'd find in Word Perfect, but right now we only have access to some
of these 10. By access we mean being able to look up the programmer's
printer control codes in the manuals and then being able to test our
work on said printer to be sure we are doing it right. If you'd like
another printer on the list, send us the name of the printer and the
printer control codes for 10 pitch, 12 pitch, 15 pitch and 17 pitch
(sometimes called 16.6 pitch) printing from the printer manual. The codes
usually look like: 027 015 or 027 103, etc.

About laser printers. The internal fonts of the standard HP
laser printers will not support all the compression codes offered by
SHORTQ. The DeskJet Plus and the LaserJet Series II have only 10 pitch
and 16.6 pitch internally. Without the use of downloaded fonts or
special font cartridges, these printers will automatically kick in to
the 16.6 pitch (the smallest) if you select 12 or 15 pitch. LaserJet
series III does support 12 pitch in addition to 10 and 16.6. We have never
tested SHORTQ on a LaserJet Series III, but the control codes are the same
as the LaserJet II so it should work.
When printing on the HP LaserJet Series II we have found that
if the line of text being printed at 10 CPI is longer that 70 characters
the last few characters are not seen - they have scrolled off the
edge of the paper.

About 15 chars per inch. As far as we know, only the Panasonic
and Epson LQ series support this compression pitch.

 December 28, 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>