Pascal Parameters lists the allowable parameters to a Pascal library and their corresponding ALGOL equivalents. For further information about Pascal, refer to the Pascal Programming Reference Manual, Volume 1: Basic Implementation.
Table 17. Pascal Parameters
|
ALGOL Parameter |
Corresponding Pascal Parameters |
|---|---|
|
BOOLEAN |
Boolean Boolean subrange |
|
BOOLEAN ARRAY [*] |
Array of Boolean |
|
BOOLEAN PROCEDURE |
Function: Boolean Function: Boolean subrange |
|
DOUBLE |
Fixed (n > 11) Sfixed (n > 11) |
|
DOUBLE ARRAY [*] |
Array of fixed (n > 11) Array of sfixed (n > 11) Packed array of fixed (n > 11) Packed array of sfixed (n > 11) |
|
DOUBLE PROCEDURE |
Function: fixed (n > 11) Function: sfixed (n > 11) |
|
EBCDIC ARRAY [*] |
Bits (n) Binary (n) U_display (n) Z_display (n) Display_z (n) S_display (n) Display_s (n) Word48 (n) Word96 (n) Integer48 Integer96 Real48 Explicit record (var) Packed array of char Packed array of subrange (17-256 elements in subrange) Packed array of enumeration (17-256 elements in enumeration) |
|
FILE |
Systemfile |
|
HEX ARRAY [*] |
Hex (n) Digits (n) S_digits (n) Digits_s (n) Boolean1 Boolean4 Packed array of Boolean Packed array of subrange (0-16 elements in subrange) Packed array of enumeration (0-16 elements in enumeration) |
|
INTEGER |
Integer Char Enumeration Fixed (n < 12) Sfixed (n < 12) Integer subrange Char subrange Enumeration subrange |
|
INTEGER ARRAY [*] |
Array of integer Array of char Array of enumeration Array of fixed (n < 12) Array of sfixed (n < 12) Array of integer subrange Array of char subrange Array of enumeration subrange Packed array of integer Packed array of fixed (n < 12) Packed array of sfixed (n < 12); Packed array of subrange (> 256 elements in subrange) Packed array of enumeration (> 256 elements in enumeration) |
|
INTEGER PROCEDURE |
Function: integer Function: char Function: enumeration Function: fixed (n < 12) Function: integer subrange Function: char subrange Function: enumeration subrange |
|
PROCEDURE |
Procedure |
|
REAL |
Real Short set (max value <= 47) |
|
REAL ARRAY [*] |
Array of real Array of record Array of set Array of vlstring Array of packed array Array of explicit type Long set (max value > 47) Record Vlstring Explicit record (by-value) Packed array of real Packed array of set Packed array of record Packed array of vlstring |
|
REAL PROCEDURE |
Function: real |
Some types of Pascal parameters can cause extra parameters to be passed if a variable of the parameter is declared as a parameter for a procedure or function. The Pascal parameters affected by this are string schema, fixed length string schema, and any other schema.
Refer to the Pascal Programming Reference Manual, Volume 1: Basic Implementation for information about the Pascal parameters.
Subranges of types integer, Boolean, char, or enumeration are mapped as their host type, except when the subranges or the types are components of packed arrays, which are described below.
Each user-defined type identifier is resolved to one of the Pascal parameter types shown in Parameter-Passing Modes according to its general type characteristics. For example, type color, as it is usually defined, would be considered an enumerated type and would be mapped to the generic type integer. The following two array declarations are equivalent:
array [index-type1] of array [index-type2] of... array [index-type1, index-type2] of...
Packed arrays of integers, reals, sets, records, variable-length strings, or other arrays are mapped as unpacked arrays of the same type. For packed arrays of Boolean, char, subrange, or enumeration types, the mapping depends on the number of bits it takes to represent the range of the type. If four bits or fewer are required, the mapping is to a hexadecimal array with lower bound. If five to eight bits are required, the mapping is to an EBCDIC array with lower bound. If nine bits or more are required, the mapping is to an integer array with lower bound.
More details appear in the data representation discussion in the Pascal Programming Reference Manual, Volume 1: Basic Implementation.
If a Pascal library program declares a parameter to be received as a read-only parameter, the client program is allowed to pass the corresponding actual parameter either by call-by-name, call-by-reference, call-by-value, or read-only. This is allowed because the Pascal library program ensures that the parameter's value remains unchanged. A client program can only pass a read-only parameter to a library program that receives the parameter as a read-only parameter, to ensure that the value of the actual parameter is not changed.

