HP Pascal/iX Programmer's Guide (31502-90023)

A-: 33
| | | | |
| 7 | * | * | * |
| | | | |
---------------------------------------------------------------------------------
* PARM=0 is equivalent to the command :PASXL (without parameters).
Example
:RUN PASCALXL.PUB.SYS
:FILE PASTEXT=Program1
:FILE PASOBJ=Object1
:FILE PASLIST=List1
:FILE PASLIB=Library1
:RUN PASCALXL.PUB.SYS;PARM=7;INFO="TABLES ON"
:FILE PASTEXT=Program2
:FILE PASLIST=List2
:RUN PASCALXL.PUB.SYS;PARM=3
:FILE PASLIST=List3
:FILE PASOBJ=Object3
:RUN PASCALXL.PUB.SYS;PARM=6;INFO="TABLES ON,TITLE 'Program 3'"
It is an error if you specify in the :RUN command that the compiler not
use the default for one of the compiler files, and you do not provide a
file equation for that file.
Example
:FILE PASTEXT=Program2
:FILE PASLIST=List2
:RUN PASCALXL.PUB.SYS;PARM=7
The above command sequence causes the compilation to abort with an error
because PARM=7 specifies that the :RUN statement not default the source,
listing, or object file and no file equation is provided for the object
file.
Run-Time Parameters
You can pass the run-time parameters PARM and INFO to your program with
the RUN command. For each parameter that you want your program to
access, you must:
* Specify a program parameter in the program heading (the position
of the variable is not important).
* Declare the program parameter as a global variable.
The program parameter that corresponds to PARM must be of type
shortint
.
The program parameter that corresponds to INFO must be of type
string
or
PAC
.
MPE/iX checks the ranges of the actual program parameters for PARM and
INFO if the RANGE compiler option is ON when the compiler encounters the
first line of the statement part of the main program. (For more
information on the RANGE compiler option, see the
HP Pascal/iX Reference Manual
.)
Example
If the progfile named ex1 contains code for the program:
PROGRAM example_1 (parm,info);
VAR