Ch 11. System Programming Extensions [ HP Pascal/iX Reference Manual ] MPE/iX 5.0 Documentation
HP Pascal/iX Reference Manual
Chapter 11 System Programming Extensions
This chapter describes extensions to HP Pascal for systems programming.
The following subjects are covered:
* pointers
* type coercion
* error handling
* parameter mechanisms
* crunched packing
* routine mechanisms
* predefined routine
Some HP implementations of Pascal do not support all of these features.
Any implementation that has system programming extensions support the
following:
* anyptr type
* the form of sizeof that accepts variables
* type coercion
* ANYVAR parameters
* TRY-RECOVER statement
* PROCEDURE and FUNCTION variables
* the predefined function addr
The motivations for providing the system programming extensions are:
* Pascal is very strict with regard to type checking. Although this
eases the burden on the user by permitting the compiler to check
the validity of an operation, it is sometimes necessary to bypass
this strict type checking.
* Pascal was originally designed as a language for teaching
programming. Because of this, serious attention is not paid to
such issues as recovery from run-time errors and the creation and
maintenance of large software systems.
* Pascal was not originally defined to be an efficient systems
programming language.
This chapter covers the HP_MODCAL and EXT_MODCAL standard levels.
Figure 11-1 illustrates the relationship between the STANDARD_LEVEL
parameters.
Figure 11-1. Relationship of STANDARD_LEVEL Compiler Option Parameters
The STANDARD_LEVEL compiler option allows the user to choose one of five
options which specifies what features or extensions are to be allowed in
a given program. The five options correspond to sets which have the
relationship depicted in Figure 11-1 above.
If a STANDARD_LEVEL option is not specified, the default feature set is
HP_PASCAL. At this level, the compiler does not recognize system
programming extension reserved words, and will issue warnings about
standard level violations whenever a predefined identifier is
encountered.
The list on the following pages delineates the language features that are
available for a given STANDARD_LEVEL. ANSI is taken as the base set.
MPE/iX 5.0 Documentation