home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / pascal / pxl214a / pxl.doc < prev    next >
Encoding:
Text File  |  1992-07-16  |  63.5 KB  |  1,687 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.                         PXL Pascal Cross-Reference Lister
  23.  
  24.                                   Version 2.14
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.                                    Programmer: R. N. Wisan, October, 1990
  56.                                     37 Clinton Street, Oneonta, NY, 13820
  57.                                             internet: wisanr@hartwick.edu
  58.  
  59.                                                     Not Copyright: Enjoy.
  60.  
  61.  
  62.  
  63.         PXL 2.14                                                 Contents
  64.  
  65.  
  66.  
  67.  
  68.  
  69.                                       Contents
  70.                                       Contents
  71.  
  72.  
  73.  
  74.                 1  Introduction  . . . . . . . . . . . . . . . . . 1
  75.  
  76.                 2  The Files . . . . . . . . . . . . . . . . . . . 2
  77.  
  78.                 3  Running PXL . . . . . . . . . . . . . . . . . . 3
  79.  
  80.                    3.1  The Interactive Mode . . . . . . . . . . . 3
  81.  
  82.                    3.2  The Command Line Mode  . . . . . . . . . . 4
  83.  
  84.                    3.3  The Batch Mode . . . . . . . . . . . . . . 5
  85.  
  86.                    3.4  The Cross-Reference  . . . . . . . . . . . 5
  87.  
  88.                    3.5  Include Files  . . . . . . . . . . . . . . 6
  89.  
  90.                    3.6  Page Format  . . . . . . . . . . . . . . . 6
  91.                       3.6.1  Headers                               6
  92.                       3.6.2  Pagination                            9
  93.                       3.6.3  Tab Width                            10
  94.                       3.6.4  Style for Reserved Words             10
  95.  
  96.                    3.7  Redirecting PXL's Output . . . . . . . .  11
  97.  
  98.                    3.8  Stopping PXL . . . . . . . . . . . . . .  11
  99.  
  100.                 4  Adapting PXL  . . . . . . . . . . . . . . . .  12
  101.  
  102.                    4.1  For Other Pascals  . . . . . . . . . . .  12
  103.  
  104.                    4.2  For Other Printers . . . . . . . . . . .  13
  105.  
  106.                    4.3  PXLINST: Editing Print Control Symbols .  13
  107.                       4.3.1  The Symbols You Need                 13
  108.                       4.3.2  Running PXLINST                      15
  109.                       4.3.3  Wide-Carriage Printers               16
  110.  
  111.                    4.4  Eliminating the Data Files . . . . . . .  16
  112.  
  113.                    4.5  Screen Colors  . . . . . . . . . . . . .  17
  114.  
  115.                 Appendix A:  Using PXL in a Network  . . . . . .  18
  116.  
  117.                 Appendix B:  History . . . . . . . . . . . . . .  19
  118.  
  119.                 Appendix C:  About Updates . . . . . . . . . . .  25
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.                                      -- i --
  141.  
  142.  
  143.  
  144.         PXL 2.14                                             Introduction
  145.  
  146.  
  147.  
  148.  
  149.                                  1  Introduction
  150.                                  1  Introduction
  151.  
  152.  
  153.             Once upon a time, Borland's Turbo Pascal came with an unad-
  154.         vertised source lister called "TLIST."  Unfortunately, it had
  155.         bugs.  This program was written to do some of the things TLIST
  156.         was supposed to do and some things it didn't.  Here are the main
  157.         features:
  158.  
  159.           o It lists a file with headers: by default it puts file name
  160.             with user's ID and creation date on page 1, file name and
  161.             page numbers thereafter.  Or, if you prefer, you can make
  162.             your own header of up to five lines.
  163.  
  164.           o It will paginate automatically, but you can insert symbols in
  165.             the file to control page breaks.
  166.  
  167.           o It handles lines of up to 255 characters.  It normally uses
  168.             two sizes of print, but they can be fonts of any size.
  169.  
  170.           o It offers options to
  171.  
  172.               - mark the reserved words by underlining them (or bold-
  173.                 facing or CAPITALIZING them or what you & your printer
  174.                 will).
  175.  
  176.               - number the lines and count begin-end pairs.
  177.  
  178.               - cross-reference the identifiers in the source file.
  179.  
  180.               - include in the listing (and cross-ref) files called with
  181.                 the {$I filename} directive.
  182.  
  183.               - redirect output to any device or file.
  184.  
  185.               - form-feed a blank page before listing.
  186.  
  187.           o It can be run from a batch file without stopping for interac-
  188.             tion.  Should anything go wrong, it sets ERRORLEVEL 1.
  189.  
  190.           o It will run on DOS 2.00 or later.
  191.  
  192.         If you leave the reserved words unmarked, of course, PXL will
  193.         list any sort of plain ASCII file.
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.                                      -- 1 --
  205.  
  206.  
  207.  
  208.         PXL 2.14                                                The Files
  209.  
  210.  
  211.  
  212.  
  213.                                    2  The Files
  214.                                    2  The Files
  215.  
  216.  
  217.  
  218.  
  219.         PXL.DOC is the documentation you are now reading.
  220.  
  221.         PXL.EXE is the working compilation.  You run it from DOS.
  222.  
  223.         PXL.WDS contains the list of reserved words PXL uses if you ask
  224.             it to mark reserved words.  This file must be in the default
  225.             directory or somewhere on the DOS path when you run PXL.[1]
  226.  
  227.         PXL.PRN contains the printer control codes which PXL uses when it
  228.             numbers the lines or marks the reserved words.  As it comes,
  229.             it contains the codes for an Epson FX-80, but it may be
  230.             changed by means of PXLINST.  It must be in the default di-
  231.             rectory or somewhere on the DOS path when you run PXL.[1]
  232.  
  233.         PXLINST.EXE is an installation program to put the proper print
  234.             control symbols in PXL.PRN.  You don't need it to run PXL.
  235.             It's only required if you have to adapt PXL for your printer.
  236.  
  237.         PXL.PAS, PXLINIT.PAS, PXLMENU.PAS and PXLLIST.PAS contain the
  238.             source code for PXL.EXE.  You might need it if you have to
  239.             recompile to change colors or as in note [1].
  240.  
  241.         PXLINST.PAS contains the source code for PXLINST.EXE.
  242.  
  243.         PXL.ID and PXL.HDR are not on your disk.  You make them yourself.
  244.             PXL.ID can hold a personal ID if you want one in your header:
  245.             just type your name in the Turbo Pascal editor, and save it
  246.             under "PXL.ID."  When PXL finds such a file, it takes up to
  247.             24 characters from it for an ID.  PXL.HDR can hold your own
  248.             default header to replace PXL's standard one.  See Section
  249.             3.6.1, "Headers," on page 6.
  250.  
  251.  
  252.  
  253.  
  254.         -----------
  255.  
  256.  
  257.         1. Strictly, PXL can be run without its .WDS and .PRN files.
  258.            Without them it can still number the lines and break up long
  259.            ones, but it can't mark reserved words or count begin-end
  260.            pairs, and it can print only plain pica.  If you ask for any-
  261.            thing it can't do, it will stop and complain.
  262.  
  263.                       __
  264.            But, there is a way of tinkering with the source code in
  265.            PXL.PAS to get it to run properly without the external data
  266.            files.  See "Adapting PXL," esp. page 16, below.
  267.  
  268.  
  269.                                      -- 2 --
  270.  
  271.  
  272.  
  273.         PXL 2.14                                              Running PXL
  274.  
  275.  
  276.  
  277.  
  278.                                   3  Running PXL
  279.                                   3  Running PXL
  280.  
  281.  
  282.  
  283.  
  284.             To run PXL, the two files, PXL.WDS and PXL.PRN must be on the
  285.         default disk or somewhere on your DOS path.  If you want an ID in
  286.         the header, you must make a PXL.ID file and keep it on the path,
  287.         too, and if you write your own default header do the same with
  288.         PXL.HDR.  There are two ways to run the program:
  289.  
  290.  
  291.         3.1  The Interactive Mode
  292.         3.1  The Interactive Mode
  293.  
  294.  
  295.  
  296.             You can simply enter PXL from the DOS prompt.  It will ask
  297.         what file you want to list.  (It adds the extension .PAS  unless
  298.         you tell it otherwise.)  It will search along the path, and, if
  299.         it finds the file, it will ask you to confirm the file name.
  300.         Then it offers some choices about how you want it printed.  You
  301.         can ask for up to five characters (upper and lower case both
  302.         work):
  303.  
  304.         L
  305.         L  (Linenumber) makes it number the lines (and use elite type if
  306.            your printer has it, to keep the lines from folding.)  If you
  307.            also call for [M]ark or [X]-Ref, it will keep count of begin-
  308.            end pairs and print the number of open Begin (or Repeat or
  309.            Case) statements at each line.
  310.  
  311.         M
  312.         M  (Mark) makes it underline the reserved words.[2]
  313.  
  314.         X
  315.         X  (X-Ref) makes it produce a cross-reference of the identifiers
  316.            in your source code.
  317.  
  318.         F
  319.         F  (Form-Feed) makes it feed out a blank page before listing.  To
  320.            do this, however, the printer must form-feed on getting the FF
  321.            (char 12) symbol.  Unless it is told (in PXL.PRN) that the
  322.            printer can do this, PXL will neither offer nor accept this
  323.            option.
  324.  
  325.         P
  326.         P  (Plain)  If you want none of these things, you can enter a
  327.            nothing at all.  Five blanks make it print plain (or, just hit
  328.            <ENTER>).  The menu says nothing about it, but a P has the
  329.            same effect (and overrides most of the others).
  330.         -----------
  331.  
  332.  
  333.         2. Here and elsewhere, I speak of "underlining," but you can
  334.            choose any other form of emphasis your printer can do.  If you
  335.            prefer or if your printer can't do anything else, you can mark
  336.            by printing the reserved words in CAPITALS.
  337.  
  338.  
  339.                                      -- 3 --
  340.  
  341.  
  342.  
  343.         PXL 2.14                                     The Interactive Mode
  344.  
  345.  
  346.         V
  347.         V  (Vanilla --plain text) This is for printing files that aren't
  348.            program code at all.  It differs from P(lain) in that it won't
  349.            pay any attention to {$I instructions (see p. 6) or {. page
  350.            formatting instructions (see p. 9) in the text.  It prints
  351.            what's there and nothing else.  It paginates and breaks long
  352.            lines, however, and you can give header and some format in-
  353.            structions in PXL.HDR (see p. 6).
  354.  
  355.  
  356.         3.2  The Command Line Mode
  357.         3.2  The Command Line Mode
  358.  
  359.  
  360.  
  361.             Used interactively, PXL is gabby.  It checks your choices,
  362.         explains your errors, and lets you make corrections.  This is
  363.         helpful, maybe, but time-consuming.  To short-cut, enter the in-
  364.         formation at the DOS prompt.  If you enter
  365.  
  366.            PXL filename
  367.  
  368.         PXL will accept the filename, check to see if it exists, and skip
  369.         its opening inquiries.  For better speed, enter
  370.  
  371.            PXL filename xxxx
  372.  
  373.         (where "xxxx" is any string of characters) it will pick the print
  374.         style letters out of the string, show you what you've asked for
  375.         and ask for confirmation.  If you want a plain vanilla printout
  376.         (no line numbers, key words unmarked), put a "P" in the string.
  377.         Order doesn't matter, you can use upper or lower case, and addi-
  378.         tional stray characters are ignored.  Note:  "P" will override
  379.         anything else (except "X").  Thus, if you enter
  380.  
  381.            PXL XYZ whelp
  382.  
  383.         It will supply the suffix, ".PAS", notice the "p" and ignore the
  384.         other letters.  You'll get file XYZ.PAS, printed plain vanilla.
  385.  
  386.            PXL xyz.pas MeltWax
  387.  
  388.         would get you file XYZ.PAS, with the works: key words underlined
  389.         (M), line numbers and begin-end counts (L), and a cross-ref (X).
  390.  
  391.            PXL XYZ.DOC L
  392.  
  393.         would print file XYZ.DOC with the lines numbered.
  394.  
  395.             When you enter the data at the command line this way, PXL
  396.         will look for your file.  If the file is found, you get one
  397.         screen asking you to confirm the file name and the print mode
  398.         choices.  If you say, "Yes," it goes into its act.  If you say,
  399.         "No" (or if it can't find your file), it reverts to the inter-
  400.         active mode, and you can correct your instructions.
  401.  
  402.  
  403.  
  404.                                      -- 4 --
  405.  
  406.  
  407.  
  408.         PXL 2.14                                    The Command Line Mode
  409.  
  410.  
  411.             However you start it going, PXL keeps you informed about what
  412.         it's doing.  (Sending lines to printer, Scanning without print-
  413.         ing, Sending X-ref lines to printer, etc.)  It gives you a run-
  414.         ning line-count --to show that something's happening-- and at the
  415.         end of an X-ref printout, you get some statistics about your
  416.         file.
  417.  
  418.  
  419.         3.3  The Batch Mode
  420.         3.3  The Batch Mode
  421.  
  422.  
  423.  
  424.             If you want to run PXL from a batch file, put a line in your
  425.         file just as you'd enter it in the Command Line Mode, but put the
  426.                  BAT
  427.         letters, BAT (upper or lower case) in the instructions.  In that
  428.         case, PXL will not stop for interaction no matter what.  If all
  429.         is well, it will print out as instructed.  If there is any hitch,
  430.         file to print can't be found, .PRN or .WDS file not on the path,
  431.                                <Esc>
  432.         or if somebody presses <Esc> during operation, it will set the
  433.         ERRORLEVEL at 1.  Your batch file can take account of that in
  434.         deciding what to do next.  Here's a sample, which will take the
  435.         file name from the command line, execute PXL, printing the file
  436.         with key words marked and lines numbered, and print "ALL WELL" if
  437.         it's printed the whole file or "ENDED BADLY" if anything went
  438.         wrong:
  439.  
  440.            echo off
  441.            pxl %1 ml bat
  442.            if errorlevel 1 goto Abort
  443.               echo                            ALL WELL
  444.               goto end
  445.            :Abort
  446.               echo                          ENDED BADLY
  447.            :end
  448.  
  449.  
  450.         3.4  The Cross-Reference
  451.         3.4  The Cross-Reference
  452.  
  453.  
  454.  
  455.             The cross-reference cites all the identifiers in your program
  456.         with the line numbers in which they occur.  They are printed with
  457.         the upper/lower case combination of their first occurrence.
  458.  
  459.             At the end of the identifier listing, you get a list of all
  460.         the procedures and functions declared in the listing.  Listing a
  461.         Unit file, PXL will list the first occurrence in the implementa-
  462.         tion of each procedure or function name (presumably it's the dec-
  463.         laration).  If you prefer to see the interface declaration,
  464.         there's a brace-out section in PXLLIST.PAS, procedure Ins, along
  465.         about line 850.
  466.  
  467.  
  468.  
  469.  
  470.  
  471.                                      -- 5 --
  472.  
  473.  
  474.  
  475.         PXL 2.14                                      The Cross-Reference
  476.  
  477.  
  478.         I should mention two limitations of the cross-reference:
  479.  
  480.           1.  As far as PXL can tell, an identifier is a given combina-
  481.               tion of symbols.  If you declare a variable like I: integer
  482.               in several different procedures, they'll be lumped together
  483.               in the X-ref listing.  If you care about having an accurate
  484.               list of the declared procedures, be careful not to use a
  485.               procedure name as a local variable earlier in the program.
  486.  
  487.           2.  Standard Pascal allows only numbers to be used as labels.
  488.               Turbo Pascal allows any legal identifier (which must start
  489.               with a letter) as well.  PXL ignores numbers, so it can't
  490.               pick up labels like 99.  If you want your labels listed,
  491.               start them with a letter.
  492.  
  493.  
  494.         3.5  Include Files
  495.         3.5  Include Files
  496.  
  497.  
  498.  
  499.             Files called with the Include directive {$I filename}, will
  500.         be included in the listing and cross-reference, provided:
  501.  
  502.           1.  PXL can find it.  If the filename specifies a path, say
  503.               {$I B:PXL2.INC}, it will look for the file first in the
  504.               place specified and then search along the path.  Whether it
  505.               finds the file or not, it will print a message on the
  506.               screen and in the printout showing what's happened.
  507.  
  508.           2.  The {$I filename} directive begins in the first column of
  509.               the code (if the directive starts anywhere else, PXL will
  510.               simply ignore it).
  511.  
  512.         This give you two ways to control inclusion of files in your
  513.         listing.
  514.  
  515.         Note: As it does with the main file, PXL will add the suffix
  516.             "PAS" to the name of include files if none is given.  To in-
  517.             struct it otherwise, put a period at the end of the filename.
  518.  
  519.  
  520.         3.6  Page Format
  521.         3.6  Page Format
  522.  
  523.  
  524.  
  525.             Unless otherwise instructed, PXL will make a one-line header
  526.         of its own devising and paginate automatically every 62 lines
  527.         (including the header).  But, you can instruct it otherwise.
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.                                      -- 6 --
  537.  
  538.  
  539.  
  540.         PXL 2.14                                                  Headers
  541.  
  542.  
  543.  
  544.         3.6.1  Headers
  545.         3.6.1  Headers
  546.  
  547.  
  548.             The standard default header occupies one line.  On the left
  549.         it puts the file name and the user's ID (if it can find a PXL.ID
  550.         file).  On the right of page 1 it puts the file date; subsequent
  551.         pages get the page number instead.
  552.  
  553.             If you prefer a different default header, you can write your
  554.         own.  Keep it in a file called PXL.HDR anywhere on the path, and
  555.         PXL will use it for its default header.[3]  Whichever default
  556.         header you use, you can further alter the header by putting in-
  557.         structions in your text.  Here are the rules for header instruc-
  558.         tions, whether in the text or in PXL.HDR:
  559.  
  560.         A PXL header can have up to five lines.[4]  You can change it at
  561.         any point in the file.  Each header line has three segments which
  562.         must be separately specified.  Each segment specifier has five
  563.         parts:
  564.  
  565.          1. { (opening brace)
  566.  
  567.          2. One of the following symbols:
  568.  
  569.                 .HnL   = left side of Header line #n
  570.                 .HnC   = center of Header line #n
  571.                 .HnR   = right side of Header line #n
  572.                 .HnN   = no Header line number #n
  573.                 .HN    = no header at all
  574.                 .HA    = Alternate left & right header segments on
  575.                          odd/even pages (for 2-sided print)
  576.                 .HTnn  = expand tabs to nn characters
  577.                 .HPLnn = page length: print nn lines per page.
  578.  
  579.             "n" of course, stands for a numeral.  The other symbols must
  580.             be upper case exactly as shown.  Those last two aren't really
  581.             about the header at all, but they can be placed in PXL.HDR.
  582.             See under "Pagination" p. 9, and "Tab Width" p.10.
  583.  
  584.          3. a space.  (That's ONE space.  Spaces after the first become
  585.             part of the text of the header segment.)
  586.  
  587.  
  588.  
  589.         -----------
  590.  
  591.  
  592.         3. There's a heavily commented header file on the disk, under the
  593.            name XXL.HDR.  To see what it does, change its name to PXL.HDR
  594.            and run PXL.
  595.  
  596.         4. This limit is controlled by constant MaxHeader, at the top of
  597.            PXLLIST.PAS.
  598.  
  599.  
  600.                                      -- 7 --
  601.  
  602.  
  603.  
  604.         PXL 2.14                                                  Headers
  605.  
  606.  
  607.          4. the text of the header segment.  Within the text, you can use
  608.             the following symbols:
  609.  
  610.                 .Fn = file name
  611.                 .Fd = file date (style: July 4, 1776)
  612.                 .Ft = file time (style: 2:25 pm)
  613.                 .Pd = present (or printout) date (style: 7/4/76)
  614.                 .Pt = present (or printout) time (style: 14:25)
  615.                 .Id = user ID (from PXL.ID)
  616.                  #  = page number (no period)
  617.  
  618.             These symbols are case-sensitive.  They must be upper/lower
  619.             case exactly as shown.
  620.  
  621.          5. } (closing brace)
  622.  
  623.         Some remarks:
  624.  
  625.           o Header instructions can appear anywhere in a line, but each
  626.             one must begin and end on the same line.
  627.  
  628.           o To empty a segment (that's previously been filled), put the
  629.             closing brace right after the symbol and space: {.H2R} means
  630.             empty right segment for 2nd header line.  In general, to emp-
  631.             ty header lines:
  632.  
  633.                               ___
  634.                 {.HN} empties all the header lines (i.e., no header).
  635.                 {.H2N} empties the second (#2) header line.
  636.                 {.H2L} empties left segment of the second header line.
  637.  
  638.           o PXL normally puts one blank line above and one blank line
  639.             below the header.  To force extra blanks lines below the
  640.             header, make a blank (not empty) header segment.  {.H5L   }
  641.             would do it --note the extra spaces between L and }.  The
  642.             first space is eaten, the others become the left segment of
  643.             header line 5.
  644.  
  645.           o Normally, header instructions take effect on the next page
  646.             after the instructions.  To specify the opening header, you
  647.                         ___
  648.             have to put all the instructions for it at the top of your
  649.             file.  You can use several consecutive lines to do it, but
  650.             there must be no blank lines between or before them.  At the
  651.             top of the file, you could (almost) specify the standard
  652.             default header thus:
  653.  
  654.                 {.H1L File: .Fn  [.Id]}
  655.                 {.H1R .Ft, .Fd}
  656.  
  657.             Then, there or anywhere in the first page's worth of text:
  658.  
  659.                 {.H1R Page #}
  660.  
  661.                                           ___
  662.           o Note: in PXL 1.41, specifying any header segments at all
  663.             anywhere in the text canceled the default header.  This has
  664.  
  665.  
  666.                                      -- 8 --
  667.  
  668.  
  669.  
  670.         PXL 2.14                                                  Headers
  671.  
  672.  
  673.             been changed.  Beginning with PXL 1.42, new header specs
  674.             change only the segments specified.  Thus:
  675.  
  676.               - To cancel the default header for a particular file, you
  677.                 must use {.HN}.  Put that in the first line of the file
  678.                 to head off the default before it gets onto the page.
  679.  
  680.               - Unlike header specs in the text, a PXL.HDR file complete-
  681.                 ly replaces the standard default header.  If you don't
  682.                 want a default header at all --not ever, create a PXL.HDR
  683.                 file that contains no header instructions.  A zero-byte
  684.                 file will do.  So long as that's on the path, PXL will
  685.                 make no headers on its own.  You can still insert header
  686.                 specs in the body of your file.
  687.  
  688.           o You can differentiate between headers for the first page and
  689.             for subsequent pages.  Within PXL.HDR (and at the top of the
  690.             text), the first specification for a given segment defines
  691.             what's to go on the first page.  A subsequent spec for that
  692.             segment will be used for other pages.  Thereafter, specifica-
  693.             tions simply supersede each other.
  694.  
  695.           o {.HA} will make PXL reverse the left and right header seg-
  696.             ments on even-numbered pages for printing on both sides of
  697.             the page.  Notice that you can't turn it off.  You can leave
  698.             it off, but once on, it's on for the rest of the file.
  699.  
  700.           o If you need several default headers for different sorts of
  701.             file, you could manage it by controlling the DOS PATH.
  702.  
  703.  
  704.         3.6.2  Pagination
  705.         3.6.2  Pagination
  706.  
  707.  
  708.             To control page breaks, put the following symbols in the
  709.         file:
  710.  
  711.         {.PA}
  712.         {.PA} produces an absolute page advance.  The line on which the
  713.             symbol appears will be the first line of the new page.
  714.  
  715.         {.CPnn}
  716.         {.CPnn} (where nn is a number) makes a conditional page break.
  717.             If there isn't room for nn lines, it will start a new page at
  718.             that point.  Look at the PXL source code.  It's peppered with
  719.             these to keep the procedures whole.
  720.  
  721.             Caution: This command specifies physical lines on the page.
  722.             If you write lines long enough to fold, PXL will not make
  723.             allowance for it and may run out of space on the page and
  724.             split your block across the page break.  If you write such
  725.             lines, be sure to allow for it in specifying the nn.
  726.  
  727.         {.HPLnn} (where nn is a number) specifies the number of lines PXL
  728.             is to print on the page (including the header).  The default
  729.  
  730.  
  731.  
  732.                                      -- 9 --
  733.  
  734.  
  735.  
  736.         PXL 2.14                                               Pagination
  737.  
  738.  
  739.             is 62 lines on a 66 line page.  This command will override
  740.             the standard 4-line bottom margin.[5]
  741.  
  742.             Here, too, a caution: This specifies the number of lines to
  743.             print, not the size of the paper.  Make sure you don't over-
  744.             run the paper by putting too large a number in HPL.  Specify
  745.             actual paper size (in lines) in "Page Control", using PXLINST
  746.             (see p. 14).  Of course, if the printer can page correctly
  747.             with FF, you don't need to specify how many lines it fits on
  748.             the paper so long as it's more than you tell PXL to put.
  749.  
  750.             Even though it's not a header specification, an HPL instruc-
  751.             tion can be placed in PXL.HDR.
  752.  
  753.  
  754.         3.6.3  Tab Width
  755.         3.6.3  Tab Width
  756.  
  757.  
  758.             The tab key on earlier Turbo Pascal editors worked by insert-
  759.         ing spaces in your text.  Beginning with 4.00, however, Turbo
  760.         Pascal allows you to insert tab characters directly in your text,
  761.         and expands them in the display.  By default, PXL will expand the
  762.         tab characters in printout to columns 8 characters wide.  You can
  763.         adjust tab width with header tab symbol: {.HTnn}.  {.HT3}, for
  764.         example, sets the tab width to 3.
  765.  
  766.             You can, of course, put the tab symbol in PXL.HDR.  I suggest
  767.         it probably ought to go in the text.  You'll want the printer to
  768.         use the same tab width you used when editing.
  769.  
  770.  
  771.         3.6.4  Style for Reserved Words
  772.         3.6.4  Style for Reserved Words
  773.  
  774.  
  775.             As it comes, PXL is set to underline TP's key (reserved)
  776.         words when you ask to [M]ark them.  It inserts printer control
  777.         symbols at the beginning and end of key words.  (What's a key
  778.         word is determined by the list in PXL.WDS.)  It comes set to use
  779.         the Epson instructions for "start underline" and "stop under-
  780.         line."  If your printer needs something different or if you pre-
  781.         fer some other style for key word marking (like boldface), you
  782.         can make the changes with PXLINST.
  783.  
  784.             If your printer can't start and stop underlining that way,
  785.         give PXL nothing at all for "start underline" and "stop under-
  786.         line."  Then, it will do its underlining by sending a bare car-
  787.         riage return (without line feed) and overprinting the line with
  788.         appropriately placed underscores.
  789.  
  790.         -----------
  791.  
  792.  
  793.         5. The default is controlled by variable BottomMargin, set in
  794.            procedure SetUp in PXL.PAS
  795.  
  796.  
  797.                                      -- 10 --
  798.  
  799.  
  800.  
  801.         PXL 2.14                                 Style for Reserved Words
  802.  
  803.  
  804.             If your printer can't do a bare carriage return without add-
  805.         ing a linefeed, or if you prefer to mark key words by having the
  806.         key words printed in CAPITALS, there's a constant you can change
  807.         in PXL.PAS procedure SetUp that will make it so.
  808.  
  809.             There's more about how to customize PXL in Sections 4.3, p.
  810.         13 and 4.4, p. 16 .
  811.  
  812.  
  813.         3.7  Redirecting PXL's Output
  814.         3.7  Redirecting PXL's Output
  815.  
  816.  
  817.             Just below the file name, PXL's screen shows where its output
  818.         will be sent.  Normally, it goes to the default printer, PRN, but
  819.         you may want it sent to some other device or to a file.  Some-
  820.         where in the command line put the name of that file or device
  821.         with double quotes around it:
  822.  
  823.            PXL MYFILE LMX "C:\PAS\MYFILE.LST"
  824.  
  825.         would list MYFILE.PAS with line numbers,  marking the key words,
  826.         making a cross-ref, and sending the output to C:\PAS\MYFILE.LST
  827.         instead of to the printer.  Notice that you cannot do this from
  828.                             ____
  829.         inside PXL.  It can only be done on the command line.  If you
  830.                                    _______
  831.         prefer, you can change the default output device.  Just change
  832.         the assignment to constant OutputDevice in procedure SetUp in
  833.         PXL.PAS.
  834.  
  835.             Writing to a file is quicker and doesn't produce piles of
  836.         printout.  That's convenient when you use PXL's BEGIN-END count
  837.         to debug "; expected" at the "end."  (The BEGIN-END count should
  838.         ______                                                     _____
  839.         always go to 0 at the end of each procedure, and it should never
  840.         go negative except at the end of a Unit which has a terminal
  841.         "end." without a "begin".)
  842.  
  843.  
  844.         3.8  Stopping PXL
  845.         3.8  Stopping PXL
  846.  
  847.  
  848.  
  849.             You can stop PXL at any point by pressing the <Esc> key.  You
  850.         may have to wait while it finishes the line it's working on and
  851.         folds up the files, but don't panic.  It will stop.
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.                                      -- 11 --
  866.  
  867.  
  868.  
  869.         PXL 2.14                                             Adapting PXL
  870.  
  871.  
  872.  
  873.  
  874.                                  4  Adapting PXL
  875.                                  4  Adapting PXL
  876.  
  877.  
  878.  
  879.  
  880.             As it comes, PXL is designed to print source files from Turbo
  881.         Pascal 4 or 5 on an Epson FX-80 from an IBM PC.  When asked to
  882.         mark reserved words, it sends the Epson printer control strings
  883.         to start and stop underlining.  If that's what you want to do,
  884.         you can use PXL.EXE as it is.
  885.  
  886.             If you prefer to mark reserved words by printing them in CAP-
  887.         ITALS, constant MarkWCaps in procedure SetUp in PXL.PAS controls
  888.         it.  In addition, PXL can be adapted:
  889.  
  890.           o For other printers, or to mark key words in some other way,
  891.             you can change the print control symbols in PXL.PRN.  See the
  892.             instructions for other printers.
  893.  
  894.           o Other Pascals (including earlier versions of Turbo Pascal can
  895.             also be accommodated by changing the reserved word list in
  896.             PXL.WDS (see below).
  897.  
  898.  
  899.         4.1  For Other Pascals
  900.         4.1  For Other Pascals
  901.  
  902.  
  903.  
  904.             The only Pascal I'm familiar with is Borland's Turbo Pascal.
  905.         If your source code is in plain ASCII text files, the main diffi-
  906.         culty about other Pascals ought to be the list of reserved words.
  907.         (PXL would print the file, but it would mark only words reserved
  908.         in Turbo Pascal 4).
  909.  
  910.             Used normally, with its data files, PXL will adjust semi-
  911.         automatically to Turbo Pascal 3.  It takes its clue from the
  912.         number of reserved words in PXL.WDS.  When you call for the M or
  913.         X options, PXL reads in PXL.WDS, and if it finds a PXL.WDS on the
  914.         path that fits TP3, it will adjust.  (Apart from the difference
  915.         in reserved words lists, TP3 and TP4+ need somewhat different
  916.         handling of the {$I } directives.)  Run without an M or X option,
  917.         of course, PXL never reads in PXL.WDS, and so doesn't get the
  918.         word.  In procedure SetUp (in PXL.PAS), there's a constant,
  919.         Turbo3, normally set to FALSE.  To make PXL default to TP3 when
  920.         printing plain, set Turbo3 to TRUE.
  921.  
  922.             You can control which file PXL finds by adjusting the PATH.
  923.         I keep both TP3 and TP5 on my disk.  They're in different direc-
  924.         tories, and I set the PATH to exclude the one I'm not using.
  925.         Each TP directory has a PXL.WDS that fits its version of TP.  PXL
  926.         lives in a utilities directory that's always on the path.  Thus,
  927.  
  928.  
  929.  
  930.                                      -- 12 --
  931.  
  932.  
  933.  
  934.         PXL 2.14                                        For Other Pascals
  935.  
  936.  
  937.         PXL always finds the right PXL.WDS.  More about this in section
  938.         4.4 on p. 16.
  939.  
  940.             The list of reserved words is in the file PXL.WDS, so all you
  941.         need to do is rewrite the PXL.WDS file to contain your Pascal's
  942.         reserved words.  Any text editor (like the Turbo Pascal editor)
  943.         which makes plain ASCII files will do.  Put one word on each line
  944.         (without any extra blanks).  Order doesn't matter.  Upper/lower
  945.         case doesn't matter.  PXL can handle up to 100 reserved words
  946.         (there are 43 in Turbo Pascal 1.00, 44 in 2.00 and 3.00 and 48 in
  947.         4.00 and 5.00) and the words may be up to 15 characters long.  If
  948.         you need more than that, you'll have to rewrite the source code.
  949.         The only things you'd have to change are in procedure SetUp at
  950.         the beginning of the implementation of PXL.PAS.  They are identi-
  951.         fied with comments.
  952.  
  953.  
  954.         4.2  For Other Printers
  955.         4.2  For Other Printers
  956.  
  957.  
  958.  
  959.             The Epson MX and early IBM printers, resemble the FX-80, but
  960.         with the standard PXL.PRN data, the line numbering mode may come
  961.         out odd because it expects an elite font, which these printers
  962.         lack. If you write lines long enough to fold, you should use
  963.         PXLINST to change the print control symbols in PXL.PRN.
  964.  
  965.             For other printers, consult your printer manual to see what
  966.         you need.  Again, use PXLINST to install the proper data.
  967.  
  968.  
  969.  
  970.         4.3  PXLINST: Editing Print Control Symbols
  971.         4.3  PXLINST: Editing Print Control Symbols
  972.  
  973.  
  974.  
  975.             To change the print control symbols, you must first work out
  976.         what symbols you'll need.  Then, with PXL.PRN on the default
  977.         drive, run PXLINST.
  978.  
  979.  
  980.         4.3.1  The Symbols You Need
  981.         4.3.1  The Symbols You Need
  982.  
  983.  
  984.  
  985.             PXL assumes that your printer can be made to underline and to
  986.         adjust its type to two different widths by sending it control
  987.         codes of 1 to 7 characters.  These characters must be in PXL.PRN,
  988.         on the default drive when you run PXL.  Up to six print control
  989.         strings are required, start and stop for two type styles, a pre-
  990.         printout printer initialization string, and a post-printout
  991.         printer reset string.  It can be told to feed out pages by send-
  992.         ing a form-feed (character #12) or by feeding out blank lines to
  993.         a specified number.
  994.  
  995.  
  996.                                      -- 13 --
  997.  
  998.  
  999.  
  1000.         PXL 2.14                                     The Symbols You Need
  1001.  
  1002.  
  1003.  
  1004.         ___________
  1005.         Underlining.  If you prefer to mark your reserved words in some
  1006.             other way (boldface? italics?), put here whatever your print-
  1007.             er needs for it.  Some printers have no underline or other
  1008.             suitable instruction, but they can back up and overprint a
  1009.             line when sent a bare CR (ASCII #13).  In that case, put no-
  1010.             thing at all for Start Underline and Stop Underline, and PXL
  1011.             will overprint reserved words with underscores.  If you want
  1012.             to mark reserved words by putting them in CAPITALS, find the
  1013.             constant, MarkWCaps, in procedure SetUp (in PXL.PAS), change
  1014.             it to True, and that's what PXL will do no matter what's in
  1015.             PXL.PRN.
  1016.  
  1017.         ________________
  1018.         Start using Pica: this should turn off the other type style
  1019.             (called "elite" here) and turn on whatever you want for the
  1020.             headers and for the main body of text when not numbering
  1021.             lines.  It doesn't have to be pica (10 characters per inch),
  1022.             so long as you give the right number of "Cols/Ln in Pica"
  1023.             below.
  1024.  
  1025.         _________________
  1026.         Start using Elite: should turn off the "pica" font and turn on a
  1027.             narrower one.  It doesn't have to be true elite (12 charac-
  1028.             ters per inch), so long as you give the right number of
  1029.             "Cols/Ln in Elite" below.  Normally, PXL uses this font when
  1030.             numbering the lines.
  1031.  
  1032.             You don't have to use two type sizes.  If you prefer, you can
  1033.             put the same instruction for both of these sizes or use dif-
  1034.             ferent type faces of the same size, or what you will.  If you
  1035.             give nothing at all for "Start using Elite," PXL will manage
  1036.             without it.
  1037.  
  1038.         _______________
  1039.         Before Printing.  If you need to send some symbols to initialize
  1040.             the printer (to set it in draft mode, for example), put the
  1041.             ASCII code for those character here.  PXL will send them to
  1042.             the printer before it sends anything else.  This instruction
  1043.             is entirely optional.  You needn't put anything here.
  1044.  
  1045.         ______________
  1046.         After Printing.  Conversely, you may need to send some symbols to
  1047.             reset the printer when you're through (to return the printer
  1048.             to letter quality, for example).  Specify those characters
  1049.             here, and PXL will send them after it's sent everything else.
  1050.  
  1051.             You might keep in mind that if PXL has used "elite" in its
  1052.             print run, it will turn it off immediately before sending any
  1053.             "After Printing" sequence you specify.
  1054.  
  1055.         ____________
  1056.         Page Control.  Here, it needs to be told whether your printer
  1057.             will feed out a new page when sent a Char #12 ("FF") and, if
  1058.             not, how many lines it puts on a page.  If you give it a 12
  1059.             for "Page control," it will use Char #12 to form-feed.  If
  1060.             you give it any other number, it will take that for the num-
  1061.             ber of lines the printer gets to a page.
  1062.  
  1063.  
  1064.  
  1065.                                      -- 14 --
  1066.  
  1067.  
  1068.  
  1069.         PXL 2.14                                     The Symbols You Need
  1070.  
  1071.  
  1072.         _______________
  1073.         Cols/Ln in Pica: a single number representing the number of
  1074.                         ____
  1075.             columns per line the printer gets in the "pica" font you
  1076.             specified above.  This method of specifying columns per line
  1077.             allows you to adjust for type style and carriage width.  Nor-
  1078.             mal pica gets 80 columns per line on a narrow printer like
  1079.             the Epson FX-80 and 133 columns per line on a wide carriage
  1080.             printer like the Epson FX-100.
  1081.  
  1082.         ________________
  1083.         Cols/Ln in Elite: the number of columns per line in the font you
  1084.             specified for "elite."
  1085.  
  1086.             Look up the print control symbols in your printer manual.
  1087.         Work out the ASCII numbers for them.  PXLINST requires the num-
  1088.         bers; it can't accept characters.  Thus, to enter "Escape G", you
  1089.         would use the numbers, 27, 71.  27 is the ASCII number for "Es-
  1090.         cape", and 71 is the number for "G". When you know what numbers
  1091.         you're going to need, put PXL.PRN on the default drive, and run
  1092.         PXLINST.
  1093.  
  1094.  
  1095.         4.3.2  Running PXLINST
  1096.         4.3.2  Running PXLINST
  1097.  
  1098.  
  1099.  
  1100.             Since it's an .EXE file, PXLINST, like PXL runs straight from
  1101.         DOS.  When you run it, PXLINST gives you a screen showing the
  1102.         nine different instructions.  If it finds PXL.PRN somewhere on
  1103.         your DOS path, it will show you what is currently in the file for
  1104.         each instruction and the "Present Data" you (or the file) have
  1105.         set for them.  It gives pretty good operating instructions.
  1106.  
  1107.           o With the up and down arrows, move the cursor bar to the line
  1108.             you want to change.
  1109.  
  1110.           o You can edit whatever happens to be on the line.  When you've
  1111.                                                 NUMBERS
  1112.             got the proper sequence of numbers (NUMBERS, not characters),
  1113.             press <Enter>, and it will move on to the next instructions.
  1114.             You can use up to seven ASCII numbers per instruction.
  1115.  
  1116.                                                       ___
  1117.             To abandon what you've done on a line, do not press <Enter>,
  1118.             Just move off the line with the up or down arrows.
  1119.  
  1120.           o If you want nothing for a given instruction, delete every-
  1121.             thing on the line and press <Enter>.[6]
  1122.         -----------
  1123.  
  1124.  
  1125.         6. If you don't want any of these print options (or your printer
  1126.            doesn't have them), put nothing for every instruction but
  1127.            "Page Control," "Cols/Ln in Pica" and "Cols/Ln in Elite."  PXL
  1128.            will then print plain vanilla, but it'll break the lines ap-
  1129.            propriately, number them, give you begin-end counts, mark the
  1130.            reserved words by overprinting them with underscores, and make
  1131.            cross-references.
  1132.  
  1133.  
  1134.                                      -- 15 --
  1135.  
  1136.  
  1137.  
  1138.         PXL 2.14                                          Running PXLINST
  1139.  
  1140.  
  1141.           o Make sure the "Present Data" display indicates what you
  1142.             wanted.
  1143.  
  1144.           o When the "Present Data" is what you want, press <Esc> to end
  1145.             the program.  It will then ask whether you want the file re-
  1146.             written with your new data.  Up to this point, PXLINST hasn't
  1147.             actually changed the file.  If you've made a mess, you can
  1148.             say "No."
  1149.  
  1150.             If you happen to run PXLINST without PXL.PRN somewhere on the
  1151.         path, no matter.  It won't have any file data to show you, and it
  1152.         will start you out with "Present Data" of "[nothing]," but you
  1153.         can enter the numbers you want, and PXLINST will create a new
  1154.         PXL.PRN file on the default disk.
  1155.  
  1156.             Earlier versions of PXL (before version 2.00) used a differ-
  1157.         ent PXL.PRN file.  If PXLINST finds such a PXL.PRN on your path,
  1158.         it will read the data from it correctly.  In such a case, you'll
  1159.         get a warning.  If you proceed with PXLINST and finally update
  1160.         the file, it will be converted to the new format.  To preserve
  1161.         the old file as is, exit without saving.  (But then, why were you
  1162.         running PXLINST at all?)  PXL 2.00, by the way, can read the old
  1163.         style files perfectly well.  If your old printer instructions
  1164.         were all you want, you don't need to manufacture a new PXL.PRN.
  1165.  
  1166.  
  1167.         4.3.3  Wide-Carriage Printers
  1168.         4.3.3  Wide-Carriage Printers
  1169.  
  1170.  
  1171.  
  1172.             Earlier versions of PXL needed to be carefully cozened to
  1173.         make them run properly on a wide-carriage printer.  Beginning
  1174.         with version 2.11, all that's gone.  If you tell PXL (through
  1175.         PXLINST) that your "Pica" font puts 133 characters per line, it
  1176.         will believe you.
  1177.  
  1178.  
  1179.         4.4  Eliminating the Data Files
  1180.         4.4  Eliminating the Data Files
  1181.  
  1182.  
  1183.  
  1184.             PXL can be made to run without the .PRN and .WDS data files
  1185.         by a simple alteration in PXL.PAS.  The program already contains
  1186.         the necessary code for loading the print instructions and re-
  1187.         served word list internally.
  1188.  
  1189.             All you have to do is set the value of DataFiles to False
  1190.         instead of True.  (You do this in procedure SetUp in PXL.PAS.
  1191.         The comments there will show you what's what.)  That will get you
  1192.         the TP4+/Epson data that's in the code.  If you want to change
  1193.         ____
  1194.         that, you must go deeper:
  1195.  
  1196.           o Procedure LoadReserv in PXLMENU.PAS contains the lists of key
  1197.             words for Turbo Pascal 3 and for Turbo Pascal 4+ (presently,
  1198.  
  1199.  
  1200.                                      -- 16 --
  1201.  
  1202.  
  1203.  
  1204.         PXL 2.14                               Eliminating the Data Files
  1205.  
  1206.  
  1207.             it has TP5.5's list).  Which list is used depends on the set-
  1208.             ting of constant Turbo3 in procedure SetUp in PXL.PAS.  If
  1209.             that's what you want, you can set the constant whichever way
  1210.             you want.  Any other list you must make yourself.
  1211.  
  1212.             If you set DataFiles to False, you commit PXL to whatever
  1213.             Turbo3 is set for.  When PXL is run normally, with Data-
  1214.             Files=True, Turbo3 controls the default, and PXL will switch
  1215.             semi-automatically between TP3 and TP4+.  Printing plain, it
  1216.             can't do it, but the M and X options require the word list
  1217.             and so force PXL.WDS to be read, and the number of words
  1218.             fount triggers the TP3/TP4+ setting.  (Apart from the actual
  1219.             reserved words, it matters for a few oddities like the hand-
  1220.             ling of {$I compiler directives.)
  1221.  
  1222.           o Procedure GetPrinterData in PXLINIT.PAS has the print control
  1223.             symbols.  Be careful to preserve the data form.  (Essential-
  1224.             ly, it's just like a Turbo Pascal string[7].)  Each of the
  1225.             first 6 instruction takes eight bytes.  The first (subscript
  1226.             0) contains the number of following bytes which are signif-
  1227.             icant in the instruction.  Set unused bytes to $FF.  The last
  1228.             3 instructions take a single byte each.  This is exactly how
  1229.             the data would come in from PXL.PRN.
  1230.  
  1231.             I suggest you begin by using PXL with the external files, be-
  1232.             cause it's easier to experiment on printer data with PXLINST
  1233.             than by changing and re-compiling PXL.  When you know what
  1234.             numbers you need, you can make the necessary changes to Get-
  1235.             PrinterData in PXLINIT.PAS, set DataFiles in PXL.PAS false,
  1236.             and recompile.
  1237.  
  1238.          If you set out to make this (or any other) adaptation, it would
  1239.         be wise to make a copy of PXL first and experiment on the copy.
  1240.  
  1241.  
  1242.         4.5  Screen Colors
  1243.         4.5  Screen Colors
  1244.  
  1245.  
  1246.             On a monochrome text monitor, PXL always runs in black and
  1247.         white.  On other monitors it normally uses color, and three vari-
  1248.         ables: NormalColor, FrameColor, and Background control the
  1249.         colors.  FrameColor is used only for the ornamental rectangle.
  1250.         Everything else is in NormalColor.  To set the colors to your
  1251.         liking, change the values in procedure SetUp in PXL.PAS.
  1252.  
  1253.  
  1254.                                    Programmer: R. N. Wisan, October, 1990
  1255.                                     37 Clinton Street, Oneonta, NY, 13820
  1256.                                             internet: wisanr@hartwick.edu
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.                                      -- 17 --
  1265.  
  1266.  
  1267.  
  1268.         PXL 2.14                                   Using PXL in a Network
  1269.  
  1270.  
  1271.  
  1272.  
  1273.                        Appendix A:  Using PXL in a Network
  1274.                        Appendix A:  Using PXL in a Network
  1275.  
  1276.  
  1277.             The batch mode (BAT) and form-feed (F) options were added in
  1278.         order to make  PXL usable conveniently on a printer-sharing net-
  1279.         work.  To illustrate this use of PXL, this appendix describes the
  1280.         use made of it with elementary classes in the PC Lab at Hartwick
  1281.         College in Oneonta, NY.  The network was the University of
  1282.         Waterloo's JANET.
  1283.  
  1284.             In this system, all utilities were kept on a virtual disk in
  1285.         "Drive A."  Students kept their own programs on a real disk drive
  1286.         labelled D: by the network, and they kept a PXL.ID user ID file
  1287.         on their disks.  They were taught to send printer output from
  1288.         their programs to a file, D:OUT.PUT.  To allow these beginning
  1289.         students to get their printouts with a minimum of confusion and a
  1290.         minimum of instruction, PXL was run from a batch file.  To get
  1291.         printouts, they merely entered:
  1292.  
  1293.             A:NEWPRINT programfilename
  1294.  
  1295.         Here is an annotated copy of NEWPRINT.BAT:
  1296.  
  1297.         ECHO OFF
  1298.         A:PXL D:%1 MLXF BAT  REM List program marked, numbered, xref, & FF
  1299.                              REM (to avoid the network's printout header)
  1300.         IF ERRORLEVEL 1 GOTO ABORT   REM If program listing went well
  1301.           A:PXL D:OUT.PUT BAT        REM   List output file plain w/o FF
  1302.           IF ERRORLEVEL 1 GOTO ABORT REM   If this, too, went well,
  1303.              A:PRINTIT               REM     send to printer
  1304.                                      REM     and report success:-
  1305.              ECHO D:%1 and OUT.PUT sent to printer
  1306.         GOTO END
  1307.         :ABORT                       REM If all did not go well,
  1308.            A:PURGE *                 REM Abort printing, & report failure:
  1309.            ECHO Error in listing.  Printout has been aborted.
  1310.         :END
  1311.  
  1312.         Note: PRINTIT is the network's print command.  PURGE * cancels
  1313.               everything sent to the print spool from this work station.
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.                                      -- 18 --
  1329.  
  1330.  
  1331.  
  1332.         PXL 2.14                                                  History
  1333.  
  1334.  
  1335.  
  1336.  
  1337.                                Appendix B:  History
  1338.                                Appendix B:  History
  1339.  
  1340.  
  1341.  
  1342.  
  1343.             In olden times, Turbo Pascal version 1.0 came with a source
  1344.         lister called TLIST.  Unfortunately, it was buggy.  Borland ex-
  1345.         plained that TLIST was an unadvertised freebie and wouldn't work
  1346.         on all printers.[7]  Mainly as an exercise, I wrote ELIST to do
  1347.         on my Epson (FX-80) some of the things TLIST was supposed to do.
  1348.         Some versions of it were circulated in July, 1984.
  1349.  
  1350.             In August of 1984, ELIST was revised to allow use of other
  1351.         printers and other Pascals by putting printer control symbols and
  1352.         reserved words in separate data files.  An awkward installation
  1353.         program was supplied to edit the printer data.  In honor of that,
  1354.         I renamed it "NELIST" (pronounce "N" and "E" separately).  Early
  1355.         versions worked only in the interactive mode.  Later versions
  1356.         added a command line mode to skip (most of) the interactive gab.
  1357.  
  1358.  
  1359.         NELIST Version 2.0, April, 1985, was improved:
  1360.  
  1361.           1.  Handles wide files (up to 255 characters):
  1362.  
  1363.                 o Breaks long lines neatly to prevent folding.
  1364.  
  1365.                 o Condensed print ("W") option added for wide files.
  1366.  
  1367.           2.  File header contains file's creation date instead of print-
  1368.               out date.
  1369.  
  1370.           3.  Include files {$I filename} incorporated in the listing.
  1371.  
  1372.           4.  Interactive messages streamlined a little, especially for
  1373.               the command line mode.
  1374.  
  1375.  
  1376.         PXL Version 1.00, June, 1985:
  1377.  
  1378.             In the spring of 1985, when our Computer Science program (at
  1379.         Hartwick College) was overhauled, Turbo Pascal 3 was adopted as
  1380.         the beginning language, to be run on an IBM PC equipped network.
  1381.         For that installation, NELIST 2 seemed a useful accessory, but a
  1382.         -----------
  1383.  
  1384.  
  1385.                         _________
  1386.         7. According to TUG Lines Vol. I, No. 3, p. 1, Borland will prob-
  1387.            ably never fix the bugs in TLIST.  Apparently, it was written
  1388.            as an in-house utility, and providing it to the customers "was
  1389.            entirely an afterthought.  One day the source code for TLIST
  1390.            was accidentally deleted..."
  1391.  
  1392.  
  1393.                                      -- 19 --
  1394.  
  1395.  
  1396.  
  1397.         PXL 2.14                                                  History
  1398.  
  1399.  
  1400.         cross-reference function was desired.  PXL is the result.  It is
  1401.         built on the old NELIST foundation, with the following changes:
  1402.  
  1403.           1.  The cross-reference (X) feature is, of course, the most
  1404.               important addition.
  1405.  
  1406.           2.  The options have been simplified.  The user now gets no
  1407.               choice about the manner of marking reserved words.  If you
  1408.               want to boldface instead of underlining them, you must
  1409.               change PXL.PRN.
  1410.  
  1411.           3.  Changing PXL.PRN is now much easier.  Installation program
  1412.               (now called PXLINST) rebuilt with full-screen data entry.
  1413.  
  1414.           4.  The ability to run without external .PRN and .WDS files has
  1415.               been built into the program.  If constant DataFiles is set
  1416.               to False, PXL will use built-in data.
  1417.  
  1418.           5.  While the program is running, a line count is displayed.
  1419.               The point of this is to assure user that the computer has
  1420.               not died.  At the end of an X-ref listing, various statis-
  1421.               tics about the program are given.
  1422.  
  1423.  
  1424.         PXL Version 1.10, July, 1985:
  1425.  
  1426.             Better documentation in PXL2.INC, smoother interactive mode,
  1427.         and:
  1428.  
  1429.           1.  PXL now understands hex numbers.
  1430.  
  1431.           2.  Programs containing exactly one procedure or function will
  1432.               now cross-ref properly.
  1433.  
  1434.           3.  For the sake of consistency, the former PXLID.DAT (the per-
  1435.               sonal ID file) has been renamed, PXL.ID.
  1436.  
  1437.           4.  You can now STOP the program at any point by pressing the
  1438.               <Esc> key.  (Control-Break doesn't work.)
  1439.  
  1440.           5.  PXL will now handle file names which have no extension.
  1441.  
  1442.  
  1443.         PXL Version 1.11, October, 1985
  1444.  
  1445.           1.  The main addition is the ability to run from batch files.
  1446.               In the batch mode it avoids interactive pauses and sets
  1447.               ERRORLEVEL 1 if anything goes wrong.
  1448.  
  1449.           2.  File name entered without a drive letter will be shown with
  1450.               the default drive letter.
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.                                      -- 20 --
  1457.  
  1458.  
  1459.  
  1460.         PXL 2.14                                                  History
  1461.  
  1462.  
  1463.           3.  Better control over include files.  Like TLIST, PXL will
  1464.               incorporate include files only if the {$I filename} command
  1465.               begins in the first column.
  1466.  
  1467.           4.  Manual includes better treatment of the problems of adap-
  1468.               ting PXL to other machines and operating systems.
  1469.  
  1470.  
  1471.         PXL Version 1.12, February, 1986
  1472.  
  1473.           1.  F (Form-Feed) option added to allow operation under a
  1474.               network which puts its own header on printouts.  The F
  1475.               option clears the network's header off the page.
  1476.  
  1477.           2.  PXL 1.11 could not safely be used in the batch mode under
  1478.               DOS 1.10 because any hitch would hang the machine.  Proce-
  1479.               dure SetErrorLevel now checks for DOS version, so batch
  1480.               mode is now safe under any DOS version.
  1481.  
  1482.  
  1483.         PXL Version 1.20, June, 1986
  1484.  
  1485.             PXL now searches along the whole DOS path both for the file
  1486.         it's to process and for its own auxiliary files.  This requires
  1487.         the newer DOS 2 file handling procedures, and the problem of DOS
  1488.         compatibility is evaded by abandoning DOS 1.10 entirely.
  1489.  
  1490.  
  1491.         PXL Version 1.21, September, 1986
  1492.  
  1493.             PXL is now savvy about screen colors.  Constants added to set
  1494.         colors to taste.  Further, PXL is polite: on exit, it returns the
  1495.         screen to the color it found there.
  1496.  
  1497.  
  1498.         PXL Version 1.22, November 15, 1986
  1499.  
  1500.             Small bug about Xref printout corrected.  Background added to
  1501.         screen color constants.
  1502.  
  1503.  
  1504.         PXL Version 1.23, November 22, 1986
  1505.  
  1506.             Bug corrected: PXL no longer hangs the machine on (a) no
  1507.         path, (b) a path which contains no semi-colon, or (c) a blank
  1508.         command-line entry.
  1509.  
  1510.  
  1511.         PXL Version 1.4X January, 1988
  1512.  
  1513.             The X means "experimental."  Rewritten in and for Turbo
  1514.         Pascal 4.00.  Provision made for Turbo 4's 8 layers of include
  1515.         files.  Asterisks at right of page indicate depth of inclusion.
  1516.  
  1517.  
  1518.  
  1519.                                      -- 21 --
  1520.  
  1521.  
  1522.  
  1523.         PXL 2.14                                                  History
  1524.  
  1525.  
  1526.             Instead of constants to switch colors & such, you must jigger
  1527.         procedure SetUp in PXL.PAS.
  1528.  
  1529.  
  1530.         PXL Version 1.41 February, 1988
  1531.  
  1532.             Some cleansy-upsy in source code.  The menu is still a hor-
  1533.         rible hack, but less horrible.  Generally, a less hasty response
  1534.         to TP4 than 1.4X was.
  1535.  
  1536.             New feature: User can override the default header and specify
  1537.         a header of up to five lines.
  1538.  
  1539.  
  1540.         PXL Version 1.42 April, 1988
  1541.  
  1542.             Improvement in header specification.  Version 1.41's in-text
  1543.         specification methods are still available, but now you can write
  1544.                 _______
  1545.         you own default header to replace PXL's by keeping what you want
  1546.         in PXL.HDR, anywhere on the path.
  1547.  
  1548.             One difference: in 1.41, any header specification in the text
  1549.         would cancel the entire default header.  Now, header instructions
  1550.         in the text replace only the segments specified.  To wipe out the
  1551.         default header, you must do so explicitly.
  1552.  
  1553.  
  1554.         PXL Version 1.43 June, 1988
  1555.  
  1556.             New function is output redirection.  First thing in quite a
  1557.                             _
  1558.         while added because I wanted it.  You can still set the default
  1559.         output place (PRN, LPT1, Filename, etc.) in PXL.PAS (procedure
  1560.         SetUp), but you can override it at run-time from the command
  1561.         line.
  1562.  
  1563.             Note: some people who had 1.43 were sent a bug-fix patch:
  1564.         begin-end count on Unit source would hang if the initialization
  1565.         section at the end had no "begin".
  1566.  
  1567.  
  1568.         PXL Version 2.00 August, 1988
  1569.  
  1570.             Should have used "2.00" earlier, maybe as early as 1.4x.
  1571.         Apart from a small bug-fix (it wouldn't mark the reserved word,
  1572.         "implementation"), this version has two changes:
  1573.  
  1574.          1. The more important change is an extension of printer codes:
  1575.  
  1576.               o Each print instruction may now have up to 7 characters
  1577.                 (instead of 3).  The purpose of this is to accommodate
  1578.                 printers requiring more than 3 characters.  In conse-
  1579.                 quence, an Epson owner could now mark reserved words in
  1580.                 underlined, boldfaced italics.
  1581.  
  1582.  
  1583.  
  1584.                                      -- 22 --
  1585.  
  1586.  
  1587.  
  1588.         PXL 2.14                                                  History
  1589.  
  1590.  
  1591.               o Two new print instructions added: PreP sent to initialize
  1592.                 printer before printing the file, and PostP sent after
  1593.                 printout to put the printer back to bed.
  1594.  
  1595.             To accommodate this, PXLINIT had to be heavily revised, also.
  1596.             The new PXLINST will convert old style PXL.PRN files to new,
  1597.             and the new PXL will still accept an old style PXL.PRN.
  1598.  
  1599.          2. Since the TP editor allows tab characters to be embedded in
  1600.             the file, PXL 2 offers an option to set the tab width.  The
  1601.             default is left at 8.  I don't think I ever documented the
  1602.             fact that PXL would expand tabs at all.
  1603.  
  1604.  
  1605.         PXL Version 2.01 September, 1988
  1606.  
  1607.             Some smoothing of the .HN header instruction.  Also, fixed a
  1608.         small bug: printing plain, junk sometimes appeared above the
  1609.         header.
  1610.  
  1611.  
  1612.         PXL Version 2.02 November, 1988
  1613.  
  1614.             Added {.HA} header instruction.  For printing on both sides
  1615.         of the page, it reverses left and right header segments on alter-
  1616.         nate pages.
  1617.  
  1618.  
  1619.         PXL Version 2.03 November, 1988
  1620.  
  1621.             Small bug corrected: TP4's {$IFDEF etc. were treated as in-
  1622.         cludes.
  1623.  
  1624.  
  1625.         PXL Version 2.04 December, 1988
  1626.  
  1627.             New option: V(anilla) or T(ext) for printing ordinary text
  1628.         files.  This differs from P(lain) in that instructions in the
  1629.         text (for headers, file inclusion or page control) are ignored.
  1630.         PXL.HDR, however, still works.
  1631.  
  1632.  
  1633.         PXL Version 2.10 April, 1989
  1634.  
  1635.             Corrected bugs about long printer instructions, hash proce-
  1636.         dure (in X-ref) and one-line RECORD .. END declarations.  Fixing
  1637.         the latter required processing reserved words from left to right
  1638.         in the line.  As a side effect, the new method gives about a 40%
  1639.         increase in speed.
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.                                      -- 23 --
  1648.  
  1649.  
  1650.  
  1651.         PXL 2.14                                                  History
  1652.  
  1653.  
  1654.         PXL Version 2.11 May, 1989
  1655.  
  1656.           o Bad bug in 2.10's new processing procedure caught and fixed.
  1657.  
  1658.           o A bug introduced by v. 2.04's Vanilla or Text option was
  1659.             preventing the batch mode from using fancy formatting.  The
  1660.             fix is leaving V(anilla) but removing the T(ext) instruction.
  1661.             (It was the "T" in "BAT".)
  1662.  
  1663.           o New PXL.PRN format allows fewer fonts (only "pica" and
  1664.                                                            _______
  1665.             "elite") but user can specify width of page in columns for
  1666.             each, so any odd character widths are now usable, narrow
  1667.             paper or wide.
  1668.  
  1669.             "Wide" option dropped as no longer needed.
  1670.  
  1671.           o Change in cross-ref list of procedures & functions; listing a
  1672.             unit file, it now shows declaration in implementation instead
  1673.             of in interface.
  1674.  
  1675.         PXL Version 2.12 (July 1989) is the same as 2.11 but accomodates
  1676.         TP 5.5's four new reserved words.
  1677.  
  1678.         PXL Version 2.13 (June 1990)
  1679.  
  1680.             Fixed a hanging bug in PXLLIST's alphabetizing of the list of
  1681.         procedures and functions.  Probably introduced in ver. 2.10
  1682.  
  1683.         PXL Version 2.14 (October 1990)
  1684.  
  1685.             Woeful deficiencies of the local computer lab's main printer
  1686.         require additional methods of marking reserved words:
  1687.  
  1688.           o If given no printer instruction strings for start and stop
  1689.             underlining, PXL will now use bare CR's to mark reserved
  1690.             words by overprinting them with underscores.
  1691.  
  1692.           o New constant in procedure SetUp (in PXL.PAS) can force PXL to
  1693.             mark reserved words by printing them in CAPITALS instead of
  1694.             trying to underline them.
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.                                      -- 24 --
  1712.  
  1713.  
  1714.  
  1715.         PXL 2.14                                            About Updates
  1716.  
  1717.  
  1718.  
  1719.  
  1720.                             Appendix C:  About Updates
  1721.                             Appendix C:  About Updates
  1722.  
  1723.  
  1724.             Updates to my programs appear irregularly and sometimes fre-
  1725.         quently, as bugs and suggestions are brought to my attention.
  1726.         Since I make no charge for these things, I can't afford to send
  1727.         updates to every software library and BBS which may be carrying
  1728.         the programs.  As of this writing, one place I do make an effort
  1729.         to keep up to date is Nelson Ford's "Public (software) Library."
  1730.         The address is:
  1731.  
  1732.                           The Public (software) Library
  1733.                                  P.O. Box 35705
  1734.                              Houston, TX 77235-5705
  1735.  
  1736.         Since the PsL is prompt both in updating their material and in
  1737.         filling their orders, they're one place where you can be sure of
  1738.         getting my latest efforts.  It is not unethical to take my pro-
  1739.                                                              __
  1740.         grams off a PsL disk and package them yourself.  (It is unethical
  1741.         and probably illegal to copy the whole PsL disk including other
  1742.         programs and the PsL's own explanatory files and programs.)
  1743.  
  1744.             Of course, people who send me useful suggestions and bug
  1745.         reports are liable to be sent a copy of the fix (if I can make
  1746.         one).  They're also liable to be drafted into my Beta Testing
  1747.         Division.
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.                                      -- 25 --
  1777.