Type functions
Because type names are in a separate name space from declared names, they cannot be used where variable references are required, in particular as arguments to built-in functions. However, type names can be used as arguments to type functions. (In ANSI terminology, these type functions are known as enquiry functions.)
These type functions are listed in Table 1.
| Function | Description |
|---|---|
| BIND | Converts a pointer to a handle for a type. |
| CAST | Converts an expression to a specified type using C conversion rules. |
| FIRST | Returns the first value in an ordinal set. |
| LAST | Returns the last value in an ordinal set. |
| NEW | Acquires storage for a structure type and returns a handle to the acquired storage. |
| RESPEC | Changes the attributes of an expression to a specified type without changing the bit pattern of the expression. |
| SIZE | Returns the amount of storage needed to represent a type. |
| VALUE | Initializes or assigns to a variable that has the corresponding structure type. |