VMS Help
PASCAL, Predeclared Routines, Allocation
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
The allocation size routines provide information about the
amount of storage allocated for variables and components of
various types. The parameters may be in the form of variable or
type identifiers. Each routine returns an integer value that
represents the allocation size of the given parameter.
The BITNEXT function returns an integer value that indicates the
number of bits that would be allocated for one component of the
specified type in a packed array or if the specified variable
appeared as a cell in a packed array.
Syntax:
BITNEXT( x )
The parameter 'x' can be a variable or any type identifier.
The BITSIZE function returns an integer value that indicates the
number of bits that would be allocated for one field of the
specified type in a packed record or if the specified variable
appeared as a field in a packed record.
Syntax:
BITSIZE( x )
The parameter 'x' can be a variable or any type identifier.
The BIT_OFFSET function returns an integer value that represents
the bit position of a field in a record.
Syntax:
BIT_OFFSET( t,f )
The parameter 't' can be of any record type or variable, and the
parameter 'f' can be any field contained in that record.
The BYTE_OFFSET function returns an integer value that
represents the byte position of a field in a record.
Syntax:
BYTE_OFFSET( t,f )
The parameter 't' can be of any record type or variable, and the
parameter 'f' can be any field contained in that record.
The NEXT function returns an integer value that indicates the
number of bytes that would be allocated for one component of the
specified type in an unpacked array or if the specified variable
appeared as the cell in an unpacked array.
Syntax:
NEXT( x )
The parameter 'x' can be a type identifier or variable.
Cells in an unpacked array are affected by alignment attributes
and, by default, are byte or naturally aligned. Therefore, the
size returned includes the actual size of the type or variable,
in addition to trailing space required to ensure proper
alignment.
The SIZE function returns an integer value that indicates the
possible or actual number of bytes that are allocated for a
specified data type or variable.
Syntax:
SIZE( x[[,t1,...,tn]] )
The parameter 'x' can be a type identifier or a variable. If
'x' is a type identifier, then SIZE returns an integer value
which indicates the number of bytes that would be allocated for
a variable or record field of type 'x'.
If 'x' is a variable, then SIZE returns an integer value that
indicates the number of bytes that are allocated for that
variable.
In the case where the parameter 'x' is a variant record variable
or variant type identifier, SIZE returns an integer value that
indicates the number of bytes that are allocated (for a variant
record variable) or would be allocated (for a variant type
identifier) for both the fixed portion of the record and the
largest variant. In addition you can supply additional
parameters t1 through tn that correspond to the case labels of
the record. The SIZE routine returns an integer value that
indicates the number of bytes that would be allocated by the NEW
procedure for a dynamic variable of the specified variant.
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.