home *** CD-ROM | disk | FTP | other *** search
- TURBOPR2.DOC
- DOCUMENTATION FILE for TURBOPR2.PAS
- 11/6/85
-
- HISTORICAL PERSPECTIVE:
- As promissed in the program comments, here are the original comments from
- the people who wrote and modified the program before me.
- . program PLIST;
- . (*
- . Written by: Rick Schaeffer
- . E. 13611 26th Av.
- . Spokane, Wa. 99216
- .
- . modifications (7/8/84 by Len Whitten, CIS: [73545,1006])
- . 1) added error handling if file not found
- . 2) added default extension of .PAS to main & include files
- . 3) added "WhenCreated" procedure to extract file
- . creation date & time from TURBO FIB
- . 4) added demarcation of where include file ends
- . 5) added upper char. conversion to include file
- . 6) increased left margin to 5 spaces (80 char. line just fits @ 10cpi)
- . 7) added listing control: {.L-} turns it off, {.L+} turns it back on,
- . must be in column 1
- .
- . further modifications (7/12/84 by Rick Schaeffer)
- . 1) cleaned up the command line parsing routines and put them in
- . separate procedures. Now permits any number of command line
- . arguments, each argument separated with at least one space.
- . 2) added support for an optional second command line parameter
- . which specifies whether include files will be listed or not.
- . The command is invoked by placing "/i" on the command line
- . at least one space after the file name to be listed. For
- . instance, to list MYPROG.PAS as well as any "included" files,
- . the command line would be: PLIST MYPROG /I
- .
- . further modification (8/28/84) by Jay Kadashaw)
- . 1) Restored filedate and filetime after listing an included
- . file.
- . 2) Added comment counter and begin/end counter.
- . 3) Output can be routed to either the printer or console.
- . 4) After listing first file the user is prompted for next
- . file if any.
- .
- . Still more modifications! (10/30/84) by Michael Roberts
- . 1) Cleaned Up various problems I encountered
- . 2) Removed Comment counter in order to add line numbers
- . 3) Added Cross-Referencing facility
- . a) IMPORTANT!! Make sure when you create COM file you assign
- . The minimum segment sizes given in a MEM compile
- . (Particularly allow a minimum Stack Size Of 1300)
- . b) The file 'TURBOPAS.RES' contains the reserved words for
- . the TURBO Pascal compiler release 2.0. If new reserved
- . words are implemented in future releases, add the new
- . words to this file.
- .
- . Please let me know if you run into any problems!
- . Michael Roberts [CIS 74226,3045]
- . 3103 Glenview
- . Royal Oak, MI 48073
- .
- .
- . (* Supported pseudo operations:
- . 1) Listing control: {.L-} turns it off, {.L+} turns it back on,
- . must be in column 1
- . 2. Page ejection: {.PAGE}, must be in column 1.
- . *)
- .
- . { When program is first run will check for a file
- . name passed by DOS, and will try to open that file. If no name is
- . passed, will ask operator for a file name to open. Proc will tell
- . operator if file doesn't exist and will allow multiple retrys.
- .
- . Included files will be expanded only if the program is invoked as
- . follows:
- . TurboPrt filename /i
- . The default is not to expand included files.
- .
- . On 2nd and later executions, proc will not check for DOS passed file
- . name. In all cases, proc will assume a file type of .PAS if file
- . type is not specified.
- . PROGRAM EXIT from this proc when a null string is encountered in
- . response to a file name request. }
- .
- This program was downloaded from the High Sierra Bulletin Board, run by
- Dave Carroll at 209-296-3534, about 10/29/85. It was restructured to
- have more options and to expect all options on the command line. Line
- numbering was changed to correspond with input file record numbers to
- make editing large programs from listings easier. A couple of bugs were
- fixed. Allowable file names were expanded to allow for paths. TURBOPAS.RES
- was updated with IBM PC Turbo Pascal 3.0 reserved words.
-
- GENERAL COMMENTS:
-
- The X option still runs slowly. At least it is optional. I think the
- routine ScanLine could be speeded up some to help that. I'll keep working
- on it.
-
- The cross referencing function does not recognize the scope of identifiers.
- If the same name is used in several places, all references will show up
- in the same place in the listing. It also does not recognize numeric
- constants. A constant like $0A will cause the name A to be listed in the
- cross reference listing. Also, the standard name list is used to exclude
- names. Shortening that list would cause standard names to be cross
- referenced also, as possible advantage. Only the first twenty characters
- are considered when matching identifiers, enough for most of us.
-
- Line numbering was changed to correspond to editor line numbers because
- my prime use of listings is to make notes for later changes. With a large
- program, the real editor line numbers on the listing make it easier to find
- my way around. One problem with this when used in a cross referencing
- system is that line numbers show up more than once if included files are
- listed. Usually this is tolerable. I will be looking at changes to the
- cross referencing system to add page numbers or something similar to relieve
- the ambiguity.
-
- The original program asked the user for file names to list and other options.
- I have taken that out in favor of the command line approach. With the
- ParamStr and ParamCount features of Turbo, this was too easy to pass up.
-
- Don Mackenzie
- 11065 La Paloma
- Cupertino, CA 95014
- 11/6/85
-
-
-
-