Vous êtes sur la page 1sur 13

________________________________________________________________________________ ________________ Lidk ping Machine Tools AB MLST Version 1.

22 20 December, 1993 ________________________________________________________________________________ ________________

MLST.EXE List program for MTC-files Version 1.22

Bengt Arne Nyman

Contents Page Chapter 1 1.1 1.2 1.3 Chapter 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.13 2.14 2.15 Appendix A A.1 A.2 A.3 A.4 Appendix B B.1 Introduction What is MLST ? This manual Bugreports Features List of contents with up to 10 levels (-S, -E) Selectable first and last page in print out (-T) Selectable title in every page (-X) Crossreference for PL/MTC variables 4 5 5 5 3 3 3

(-L, -W) Adjustable pagelength, pagewidth and tab size 6 (-2) 2-side printing 6 (-I) Output to file for background printing 7 (-C) Replace function for variable texts and variable group headers 7 (-N) Sourceline numbering Different tab size in declaration and process part (-F) Flag numbering for MTC86/88/90 versions 4.2 Translation between hardware and software adresses (-M) Warnings are generated when the program forces a pagebreak (-H) First page can be printed without bars (-R) Rawlist option Changes from previous versions New switch character No default flag number print out Crossreference bug corrected Changeable tab size Online help Online help page 12 11 11 11 11 9 9 9 9 10 10 10

Chapter 1. Introduction 1.1 What is MLST ?

MLST is a tool for PL/MTC-programmers that produces nice print outs of PL/MTC-programs with the following features: it output List of contents with up to 10 levels Selectable first and last page in print out Selectable title in every page Crossreference for PL/MTC variables Adjustable pagelength, pagewidth and tab size 2-side printing Output to file for background printing Replace function for variable texts and variable group headers Sourceline numbering Different tab size in declaration and process part Flag numbering for MTC86/88/90 versions 4.2 and earlier Translation between hardware and software adresses for bit input and b Warnings are generated when the program forces a pagebreak First page can be printed without bars Rawlist option

The default page layout includes bars at the top and at the bottom of ea ch page. These bars includes information about the name of the source file, last modification date a nd time of the source file, page number and program title. The contents lines are also written on the correspon ding page in the lower bar. The default output from the program is directed to three files: MLST.1 ( the source list and, when using the Xswitch, the cross reference list), MLST.2 (the contents) and when using the -C switch, MLST.3 (the variables and their texts). The program list can be redirected to any file (inclu ding the console or a printer, but the contents is allways written to a file (MLST.2). A small .BAT-file must be written to get the contents before the program list on the printer: MLST %1 PRINT MLST.2 PRINT MLST.1 1.2 This manual

This manual describes the different features of the MLST list program ve rsion 1.22. 1.3 Bugreports

Bugreports and requests of new features can be sent to: Lidk ping Machine Tools AB Electronic Application Design De pt. tel +46-510-88 000 fax +46-510-245 41 S-531 19 Lidk ping SWEDEN

Chapter 2. Features 2.1 List of contents with up to 10 levels

The table of contents produced can be formated in two ways. The first an d default way uses the normal PL/MTC syntax using />header text for headers and /<sub header text for subheaders. The second optional way uses /!{0 1 2 3 4 5 6 7 8 9}hea der text where level 0 is the highest level. Note that when using this option to forma t the table of contents, one empty line will be printed before every header with a dif ferent level than the previous one. A level-0 header will generate an extra empty line wh en specified with /!0. In both cases the indentation for each level will be 2 columns per level. Example 1: source: .B />This is a header /<This is a subheader />This is another header .P output: This is a header .......................................... 1 This is a subheader ..................................... 1 This is another header .................................... 1 Example 2: source: .B /!0This /!1This /!1This /!2This /!1This /!0This .P is is is is is is a header a subheader on a subheader on a subheader on a subheader on another header

level level level level

1 1 2 1

output: This is a header .......................................... 1 This is a subheader on level 1 .......................... 1 This is a subheader on level 1 .......................... 1 This is a subheader on level 2 ........................ 1 This is a subheader on level 1 .......................... 1 This is another header .................................... 1

2.2

(-S, -E) Selectable first and last page in print out

The -S and -E switches can be used to select the first and last page to be printed. The switches requires the page number as a parameter attached directly to the switch (no space allowed between the switch and the page number). If the first page number selec ted is higher than the last page in the file no pages will be printed. If the last page number is l ower than the first page number one page (the last page) is printed. The program counts the number of pages printed. List of contents is not generated when using the -E switch. Example 1: command line: MLST filename.ext -S:35 -E:38

output: Pages 35-38 are printed to MLST.1 Example 2: command line: MLST filename.ext -S:35

output: All pages from page 35 to the last page are printed to MLST.1 List of contents is written to MLST.2 2.3 (-T) Selectable title in every page

The -T switch can be used to select another program title on every page. To make it possible to write a string containing spaces the underscore character is replace d with a space character in the title string. The string will be written centered in the upper l eft box in the lower bar. On odd pages, when using the -2 switch, the string will be written in the upper right box in the lower bar. The maximum number of characters in the title string is 27 and the default string is "S K F". Example: command line: MLST filename.ext -TLidk ping_Machine_Tools_AB

output: The string Lidk ping Machine Tools AB is printed in every page. 2.4 (-X) Crossreference for PL/MTC variables

The -X switch can be used to print out a crossreference of MTC-variable s in the list file. Example: command line: MLST filename.ext -X

output: A cross reference is appended to the list file.

2.5

(-L, -W) Adjustable pagelength, pagewidth and tab size

The -L and -W switches can be used to select different page length and w idth when another paper size is used. The -W switch can also be used to change the default tab size in the declaration and process part of the MTC program listing. Only the size of the first and second tab on e ach line can be changed, the following tabs are converted to one (1) space. The default page length is 70 line s and the default (and minimum) width is 79 columns. The minimum page length is 25 lines (21 lines in raw lis t mode). The default values are 12 columns in the declaration part and 24 columns in the process part. Examples: command line: MLST filename.ext -L:47 -W:110,15,25

output: Pages are formated with 47 lines and 110 columns. Tab size is 15 columns in declaration part and 25 columns in process part. command line: MLST filename.ext -L:47 -W:110,15

output: Pages are formated with 47 lines and 110 columns. Tab size is 15 columns in declaration part and 15 columns in process part (same as in declaration part ). command line: MLST filename.ext -L:47 -W:110

output: Pages are formated with 47 lines and 110 columns. Tab size is NO T changed, the default values are used. 2.6 (-2) 2-side printing

The -2 switch can be used to select two-side printing. NOTE! This switch only changes the page layout. Example: command line: MLST filename.ext -2

output: Pages are adjusted according to if they are even or odd.

2.7

(-I) Output to file for background printing

The output of the program is default redirected to files to make it poss ible to print the program list in the background. The list of contents is redirected to a separate fil e to make it possible to print the contents before the program list. The default output files are MLST.1 ( program) and MLST.2 (contents) but it is possible to select another file for the program list using th e -I switch. Note! It is NOT possible to redirect the contents to another file. Example: command line: MLST filename.ext -I:PRN

output: The program list is written directly to PRN. 2.8 (-C) Replace function for variable texts and variable group headers

The -C switch can be used to select another file as source file for the variable texts and the group header texts. This feature is usefull when one MTC file is used in more than one application with different languages. The working principle is this: 1. The variable text file is opened and the variable names are stored to gether with their texts. 2. The MTC file is opened for printing. 3. If a variable in the MTC file is found in the variable text file, the n the text will be replaced with the text from the variable text file. Example: command line: MLST filename.ext -C:language_file.ext

output: The text string associated with variables comes now from languag e_file.ext.

To make it possible to replace the group headers, the programmer must wri te a unique symbolic "variable name" on the sourceline just before each header. Note! The symbolic var iable name must start with "/%T" to be treated as a symbolic variable name by MLST. After "/%T" up to six (6) more characters can be added to identify the title string. Example: command line: MLST filename.ext -C:language_file.ext %Txxxxxx 'Ing ngar

variable text file:

MTC file: /%Txxxxxx /'Inputs output: The text string Inputs is replaced by the string Ing ngar. Note! The original MTC file is NOT changed but two other files are creat ed using this option: filename.CHA is a copy of the original MTC file with the replaced tex t strings. This file can be used as input file to the MTC-compiler making it possible to change l anguage on the variable comments without changing the source file manually. MLST.3 is a copy of the variable text file with only variable names and their texts. MLST accepts MTC files as variable text files and this output fi le can be used to extract only the variables and their texts from the MTC file.

2.9

(-N) Sourceline numbering

The -N switch can be used to select sourceline numbering. This option is automatically selected when the crossreference switch (-X) is selected. Example: command line: MLST filename.ext -N

output: The source line number is printed in every source line. 2.10 Different tab size in declaration and process part

The default tab size in the declaration part is 12 columns and in the pr ocess part 24 columns. The size can be changed using the -W switch (see 2.5). 2.11 (-F) Flag numbering for MTC86/88/90 versions 4.2 and earlier

The -F switch enables the printout of associated flags but the flag numb ers are only valid for MTC versions 4.2 and earlier due to changes in the internal structure of the MTC system in version 5. Example: command line: MLST filename.ext -F

output: The logical flag number is printed on flag declaration lines. 2.12 Translation between hardware and software adresses for bit input and bit output The software adresses on input and output boards (e.g. 34/BI/00) are tra nslated to the corresponding hardware address (e.g. A12z12). To make it possible the programmer must associate the boards software adress with the location of the board. If the software adress don't hav e a board location associated, the board location is replaced by I__ for bit inputs and O__ for bit outputs. The board association line must be placed before the declaration of bit inputs and bit outputs. Example: MTC file: /: 34/BI A12 Board association line / \___/ \_/ / ______ / SQ7 <tab> 34/BI/00 <tab> 'Dress arm disengaged 34/BI/00 'Dress arm disengaged

output: SQ7 A12z12

2.13

(-M) Warnings are generated when the program forces a pagebreak

The -M switch can be used to supress the warning messages to the console during file processing. -M- disables the output and -M+ enables the output again. Warning messages are gener ated when a page break is forced without a page break command(.P or $EJECT) in the source file. Example: command line: MLST filename.ext -M-

output: Warning messages are suppressed. 2.14 (-H) First page can be printed without bars

The -H switch can be used to supress the upper and lower bars on the fir st page in the list. Note! The comment slash (/) is also suppressed on the first page when using this option. Example: command line: MLST filename.ext -H

output: First page is printed without upper and lower bars. 2.15 (-R) Rawlist option

The -R switch can be used to supress the upper and lower MTC-style bars on the list. Only the file name, the page number and the title are printed on each page. This opti on can be usefull when printing sourcecode written in other programming languages as PLM86, Pascal, C, etc. Example: command line: MLST filename.ext -R

output: All pages are printed without upper and lower bars.

Appendix A. Changes from previous versions A.1 New switch character (version 1.20)

The switch character is now a minus sign (-) but the slash (/) from prev ious versions can still be used in all cases. A.2 No default flag number print out (version 1.20) The flag number print out now requires the -F switch. A.3 Crossreference bug corrected (version 1.21)

When using the X-switch the crossreference procedure in some cases did n ot detect variables declared with trailing blanks. This bug is now corrected. A.4 Changeable tab size (version 1.22)

The tab size in the declaration and process parts of the MTC program lis ting can now be changed.

Appendix B. Online help B.1 Online help page When starting MLST without parameters a brief help page is shown:

MLST v 1.22

release date: 1993-12-20

MLST [filename.ext] [-s -e -t -l -w -n -x -2 -r -f -h -m -i -c] Default: Examples: -s:48 -e:52 -tMy_list -l:47 -w:110,15,25 -n -x -2 -r -f -h -m-i:FILE.LIS -c:FILE.TXT Start printing at page 48 1 End printing at page 52 999 Title "My list" on each page S K F Page length 47 lines 70 Page width 110 columns,tabs 15 (decl),25 (proc) 79,12,24 Enable source line numbering OFF Enable MTC X-reference list OFF 2-side printing OFF Raw list, no bars OFF Flag number print out OFF Header before list OFF Inhibit warning messages to console OFF Change output from MLST.1 to FILE.LIS Change language of variable text (New text from FILE.TXT)

Exit MLST 1993-12-20 12:33:28