• Aucun résultat trouvé

COMPILATION OPTIONS

Dans le document Pascal in MTS (Page 23-28)

PASCAL/JB OPTIONS

COMPILATION OPTIONS

behaviour of the run-time system that is available to programs compiled using Pascal/JB.

Compilation options may appear either in the PAR field of the $RUN command or on the /COMPILE statement. Similarly, execution options may appear either in the PAR field or on the /EXECUTE statement. Any conflicts between options appearing in the PAR field of the $RUN command or on the /COMPILE or /EXECUTE statements are resolved in favor of the PAR optiions. Also note that execution options have no effect if the compiler is not being run in Compile-Load-and-Go (CLG) mode since the program is not executed in that case.

COMPILATION OPTIONS

The following are the compilation options accepted by Pascal/JB. The underlined portions represent the minimum acceptable abbreviations.

ARRAYINIT / NOARRAYINIT Default: ARRAYINIT

This option activates or deactivates uninitialized variable checking for variables that are elements of arrays.

CHECK / NOCHECK Default: CHECK

This option controls whether the compiler generates code to perform certain run-time consistency checks. For example, if CHECK is specified (or defaulted), the compiler will generate code to ensure that every variable is assigned a value before it is referenced in an expression. If an uninitialized variable is referenced during the execution of the compiled program, Pascal/JB will generate an execution error message followed by a symbolic dump of all active routines and variables. Other checks ensure that the values assigned to variables are within the allowable range for that variable and that pointer variables do not reference disposed records. See the description of the /CHECK control statement in the section, “Other Control Statements,” for a full description of the checks available and how to selectively (de)activate them.

CLG / DECK Default: CLG

This option determines if the compiler is in Compile-Load-and-Go mode or DECK mode. In Compile-Load-and-Go mode, the compiler compiles the source program and, if there were no errors, executes the compiled program. In DECK mode, an object module is produced on logical I/O unit SPUNCH. NODECK is a synonym for CLG and NOCLG is a synonym for DECK. If either SPUNCH or logical I/O unit 0 is explicitly assigned on the $RUN command, the default is DECK; otherwise, the default is CLG. If SPUNCH is assigned, the object module is written on SPUNCH. If logical I/O unit 0 is assigned (but not SPUNCH), then it is assumed to be assigned

Pascal/JB: Pascal/JB Options 23

to a file containing an object library. The object module produced by Pascal/JB is added to or replaced in this object library. See the description of *OBJUTIL in MTS Volume 5,System Services, for a description of object libraries.

CPAGES=n

Default: Unlimited

This option limits the number of pages of program listing that will be produced during the compilation of the module. If this limit is exceeded, an error message is generated and compilation is terminated.

CROSSCHECK / NOCROSSCHECK Default: NOCROSSCHECK

This option causes the Pascal/JB run-time support to check the declarations of variables and procedures across module boundaries. This extra type-checking is performed before program execution is initiated. An error message is generated and execution is suppressed if incompatible declarations are encountered. Intramodule declaration checking is performed automatically by the compiler at the time that the module was compiled.

CTIME=n

Default: Unlimited

This option limits the amount of time (in CPU seconds) available for compiling the module. If this limit is exceeded, an error message is generated and compilation is terminated.

DEBUG / NODEBUG Default: DEBUG

This option controls whether or not the information required to produce a symbolic post-mortem dump or to invoke the interactive debugger is to be included as part of the object module produced by the compiler. If NODEBUG is specified and an error occurs during the execution of the program, the symbolic post-mortem dump will be suppressed. Specifying NODEBUG may reduce the size of the resulting object module significantly.

DISPOSECHECK / NODISPOSECHECK Default: DISPOSECHECK

This option controls whether checks are generated that ensure that references to records via pointer variables do not refer to records that have been released through a call to DISPOSE or RELEASE. If DISPOSECHECK is specified (or defaulted), an execution error will occur if a pointer is used to reference a disposed or released record.

24 Pascal/JB: Pascal/JB Options

DPAGES=n

Default: Unlimited

This option limits the number of pages of output that may be produced during a post-mortem dump (which may occur as the result of an error detected during the execution of the program).

If this limit is exceeded, an error message is generated and the post-mortem dump is terminated. This option is ignored in DECK mode.

INITCHECK / NOINITCHECK Default: INITCHECK

This option activates or deactivates uninitialized variable checking. See the section,

“Uninitialized Variable Checking,” for a full description of this feature. INITCHECK implies ARRAYINIT and RECORDINIT. NOINITCHECK implies NOARRAYINIT and NORECORDINIT.

LANGLVL={STANDARD | STDRES | PVS | EXTENDED}

Default: EXTENDED

This option controls the language features available. If LANGLVL is set to STANDARD or STDRES, those language features incompatible with the Pascal standard are flagged with a warning message. Additionally, if LANGLVL is set at STDRES nonstandard reserved words are not recognized. This allows the nonstandard reserved words to be declared as identifiers within the program. If LANGLVL is set to PVS, those language features not available in the IBM Pascal/VS compiler are flagged with a warning message. If LANGLVL is set to EXTENDED, all available language extensions are supported.

LIBRARY=FDname Default: None

This option specifies the name of a file or device which contains the object modules for routine(s) referenced by the program being compiled. In Compile-Load-and-Go mode, these routines are loaded prior to the execution of the program. This option is ignored in DECK mode.

LINECNT / LINECOUNT=n Default: 60

This option sets the number of lines per page of the compilation listing.

MARGINS=(n,m) Default: (1,255)

This option specifies the margins for the source statements for the program. Any characters not within the margins specified are ignored. The margins must be in the range of 1 to 255 and the left margin must be less than the right margin (n<m).

Pascal/JB: Pascal/JB Options 25

OPTIMIZE / NOOPTIMIZE Default: NOOPTIMIZE

This option causes the resulting object code to be post-processed by the compiler in order to produce a more efficient and/or more compact program. The OPTIMIZE option implies NODEBUG and may increase slightly the cost of compilation.

PAGEWIDTH Default: 132

This option specifies the width of the page for the compilation listing. The width must be in the range of 79 to 132.

RECORDINIT / NORECORDINIT Default: RECORDINIT

This option activates or deactivates uninitialized variable checking for variables that are components of records.

SHORTRECORDS / NOSHORTRECORDS Default: SHORTRECORDS

This option controls the effect of calls to the predefined procedures NEW and DISPOSE where explicit tag field values are specified. If SHORTRECORDS is specified (or defaulted), Pascal/JB will generate object code that allocates a record that is just long enough to contain the variant part selected by the tag field value specified in the call to NEW or DISPOSE. If NOSHORTRECORDS is specified, the compiler will generate object code that allocates records long enough to hold the maximum variant part regardless of the values specified for the tag fields. That is, if NOSHORTRECORDS is specified, the tag field values specified on calls to NEW or DISPOSE are ignored, and NEW and DISPOSE behave as if the tag fields had not been specified. This option is particularly useful for isolating errors in the use of records with variant parts. The NOSHORTRECORDS option corresponds to the way Pascal/VS handles NEW and DISPOSE.

SIZE=n

Default: 4P

This option sets the initial size of the compiler working storage. The compiler will automatically allocate more space when it is required so this option is always optional. For very large programs, it may be desirable to set the size to a value somewhat larger than the default in order to reduce the number of space acquisitions required by the compiler. This may result in a slight reduction in the overall cost of the compilation.

26 Pascal/JB: Pascal/JB Options

SOURCE / NOSOURCE Default: See text below

This option controls whether a compilation source listing is to be produced on the logical I/O unit SPRINT. By default, the listing is always produced in batch mode. In conversational mode (that is, from a terminal) a listing is produced only if SPRINT has been explicitly assigned.

STATS / NOSTATS Default: STATS

This option controls the printing of compilation statistics at the end of each compilation.

WARNING / NOWARNING Default: WARNING

This option controls whether or not the compiler produces warning messages. It is strongly suggested that this option beenabledsince warnings are usually errors (they are classified as warnings only because they are notalwayserrors).

XPAGES=n

Default: Unlimited

This option limits the number of pages of TEXT output that may be produced during the execution of the program. If this limit is exceeded, an error message is generated and execution is terminated or control is returned to the interactive debugger as appropriate. This option is ignored in DECK mode.

XREF[={LONG | SHORT}] / NOXREF Default: NOXREF

This option controls whether or not a cross-reference listing is produced after the compilation listing. If no compilation listing is produced, this option has no effect and no cross-reference listing is generated. The cross-reference listing contains an alphabetical list of each identifier in the module showing the attributes of the identifier and the line number of each reference to the identifier. If XREF=SHORT is specified, those identifiers that were declared but never referenced are omitted from the cross-reference listing. XREF is equivalent to XREF=LONG.

XSTACKLIMIT=n Default: Unlimited

This option limits the amount of stack space (in bytes) that may be used during the execution of the program. If this limit is exceeded, an error message is generated and execution is terminated or control is returned to the interactive debugger as appropriate. The scale factors K or P may be used to specify kilobytes (1024 bytes) or pages (4096 bytes), respectively (e.g., XSTACKLIMIT=40P). This option is ignored in DECK mode.

Pascal/JB: Pascal/JB Options 27

XTIME=n

Default: Unlimited

This option limits the amount of time (in CPU seconds) that may be used during the execution of the program. If this limit is exceeded, an error message is generated and execution is terminated or control is returned to the interactive debugger as appropriate. This option is ignored in DECK mode.

Dans le document Pascal in MTS (Page 23-28)