SPL COMPILER CONVENTIONS [ MPE Segmenter Reference Manual ] MPE/iX 5.0 Documentation
MPE Segmenter Reference Manual
Appendix B SPL COMPILER CONVENTIONS
One RBM for:
* Outer block (initialization).
* Each procedure.
$CONTROL SEGMENT=segmentname
* Used to assign an RBM to a specified segment.
* In effect until the next $CONTROL SEGMENT command.
* A segname may be up to 15 alphanumeric characters in length, starting
with an alphabetic character. Must be unique within 15 characters to
meet the requirements of the Segmenter.
* For procedures, the $CONTROL SEGMENT command must precede the
procedure declaration of the first procedure in the segment.
* If a new segment is to be specified for the main program, the
$CONTROL SEGMENT command follows the procedure and intrinsic
declarations and precedes the global subroutines and main body.
* Global subroutines must be in the same segment as the main body.
* All program units having the same segment name are compiled into one
segment.
If no $CONTROL SEGMENT command appears, the compiler uses SEG' as the
default name of the current segment and places all RBMs into SEG'.
Outer block generated unless subprogram is specified.
$CONTROL SUBPROGRAM = list_of_procedure_names
* Permits independent compilation of specified procedures, allowing
programmer to select parts of a large program for compilation (and
subsequent preparation and execution).
* Minimizes the number of entries in the USL directory.
* If used, must be specified at the beginning of the program.
* Suppresses generation of the outer block.
OPTION EXTERNAL
* Specifies that the procedure body (or code) exists external to the
program being compiled. The procedure is not included in the
declaration and will be linked to the main program later by the
operating system.
* When procedures are compiled separately to be called later with this
option, they can use the EXTERNAL-GLOBAL mechanism to establish data
linkages.
* EXTERNAL variable declarations link global variables in a separately
compiled main program to variables in a procedure. The global
variables must be declared with the GLOBAL attribute. See the SPL
Programming Language Reference Manual (30000-90024) for two methods
of using the EXTERNAL-GLOBAL mechanism.
- OPTION CHECK
* Specifies the level of checking the Segmenter will perform for OPTION
EXTERNAL procedure declarations which will subsequently be called as
externals by other programs.
* No checking performed if this option is not specified.
* If the procedure or function has a lower checking level, the
Segmenter ignores the level indicated by OPTION CHECK and uses the
lower level.
MPE/iX 5.0 Documentation