HP Pascal/iX Reference Manual (31502-90022)

11- 11
and
long
pointers.
Long pointers
can point to any addressable object on the system (in this
sense addressable in terms of the representability of an address, as
opposed to allowed access rights).
Short pointers
can point to a subset of the objects addressable by long
pointers. A subset of the object addressable by short pointers are
objects in the heap. By default, all user declared pointers are short
pointers.
The following diagram explains the relationship between these classes of
pointers.
Figure 11-5. Pointer Class Relationship
Note that in some implementations, long and short pointers may be
identical; in other words, the collection of objects that long and short
pointers can point to may be the same.
The compiler option EXTNADDR can be used to specify that a given user
defined pointer type is to be a long pointer.
Localanyptr.
The predefined type localanyptr is a pointer type that is assignment
compatible with any other pointer type. It can be used to defeat type
checking on pointers.
A pointer of any type can be assigned to a pointer of type localanyptr,
and a pointer of type localanyptr can be assigned to any pointer type.
However, since pointers of type localanyptr are not bound to a base type,
they cannot be dereferenced. (In order to dereference a pointer of type
localanyptr, it must first be type coerced or assigned to a proper
pointer type).
localanyptr takes the form of a short pointer. It may only be able to
represent a subset of the addresses on a machine. On implementations
where short and long pointers are not the same, localanyptr is more
efficient than globalanyptr.
Permissible Operators
assignment :=
relational =, <>
Example
VAR
ptr1 : pointer_type_1;
ptr2 : pointer_type_2;
anyp : localanyptr;
BEGIN
...
anyp := ptr1;