PXREF Pascal Cross Reference Program Version 1.0 (c) 1988 Robert Webster INTRODUCTION This program generates a listing of a pascal program and a cross reference listing of the variables, procedures & functions, built-in procedures, and key words. The listing can be output to disk, printer ports, or serial ports. Any section of the output can be enabled or disabled. In addition, only symbols with a single reference can output to help find unreferenced variables in a program. The program defaults can be set in a setup file. Settings can be overridden with command line parameters. File names can be specified on the command line for batch operation, or can be entered when the program is run. This program is compatible with both Turbo Pascal files and Microsoft Pascal. It can be tailored for other Pascals by creating a file of reserved words and a file of built-in procedures for the particular compiler. Two versions of the PXREF are available - one for MSDOS, and one for OS/2 protected mode. RUNNING PXREF To run the program, enter PXREF. The complete syntax is: PXREF [infile] [listfile] [options] Infile is the Pascal file name. If this file name is not included on the command line, you will be asked for it and the listing file name. A file extension of .PAS is assumed if none is given. Listfile is the listing file name. To output to a printer, enter LPT1:, COM1:, etc. If the list file is omitted and the input file name is given, the input file name with the extension .LST is used for the list file. Options: /BUILTIN or /B - Output a list of built-in functions and procedures referenced in the program. /NOBUILTIN or /NB - Do NOT output a list of built-in functions and procedures referenced in the program. This is ordinarily the program default. It may be specified to override the default file. /RESERVED or /R - Output a list of reserved words referenced in the program. /NORESERVED or /NR - Do NOT output a list of reserved words referenced in the program. This is ordinarily the program default. It may be specified to override the default file. /LIST or /L - Output a program listing along with the cross reference listing. /NOLIST or /NL - Do NOT output a program listing. This is ordinarily the program default. It may be specified to override the default file. /UNREF - Output only those symbols with a single reference in the cross reference listing. This helps find unreferenced variables. /NOUNREF - Output all referenced symbols in the cross reference listing. This is ordinarily the program default. It may be specified to override the default file. /PRINT or /P - Output page headings and page feed characters in the listing if it is sent to a disk file. (The page headings and page feed characters are always output if the listing is sent to LPT1:, COM1:, etc.) /NOPRINT or /NP - Do NOT page headings and page feed characters in the listing if it is sent to a disk file. (The page headings and page feed characters are always output if the listing is sent to LPT1:, COM1:, etc.) This is ordinarily the program default. It may be specified to override the default file. /WIDE or /W - Use a line length of 132 columns. /NOWIDE or /NW - Use a line length of 80 columns. This is ordinarily the program default. It may be specified to override the default file. /MS - Source file is Microsoft Pascal. /TP - Source file is Turbo Pascal. /LL=nn - Specify the line length in columns. nn = number of columns. /LL=80 does the same thing as /NOWIDE. /LL=132 does the same thing as /WIDE. /PL=nn - Specify the page length in lines. nn = number of lines. THE DEFAULT FILE Program defaults may be specified in the file PXREF.DAT. To do this, edit the file and put any of the above parameters in the file. There can be more than one parameters on each line, and there can be more than one line of parameters. For example, to set up the program for Turbo Pascal and a wide carriage printer, you could put the following in the file PXREF.DAT: /TP /WIDE CUSTOMIZING PXREF PXREF uses two files - one containing lists of key words and another containing a list of built-in procedures. The is one set of these files for Microsoft Pascal and one set for Turbo Pascal: MSRESERV.DAT - Microsoft Pascal reserved words. MSBUILT.DAT - Microsoft Pascal built-in procedures and functions. TPRESERV.DAT - Turbo Pascal reserved words. TPBUILT.DAT - Turbo Pascal built-in procedures and functions. The files used depends on the /MS or /TP parameter in the default file or the command line. To configure this program for another Pascal compiler, change one set of the files to contain the appropriate symbols used by the new compiler. PROGRAM LIMITATIONS This program can handle a maximum of 3000 variables and 20000 references. This is probably enough for any module that can be compiled by the Microsoft or the Turbo Pascal compilers. LICENSE AND LEGAL GARBAGE This program is licensed STRICTLY "AS IS", without any warranty for its performance, accuracy, or freedom from error, or results generated through its use, including, but not limited to, any implied warranties or warranties of merchantability or fitness for a particular purpose. You assume the entire risk as to the results and performance of the program. I do not warrant that the program will meet your requirements or operate without interruption or error. This program can be distributed freely as long as it is distributed intact and unmodified in the original distribution archive file, and as long as it's not sold for more than $10. If you like this program, please support the shareware concept and send $10,000 to: Robert Webster 287 Cottonwood Rd. Pryor, OK 74361 (918) 825-7205 See the DesignCAD BBS for the latest release - (918) 825-4895 Evenings and Weekends (6:00 pm - 8:30 am Central Time on weekdays)