- 2.2.6.7 -
TMT Pascal Language Description
Pascal Language Structure
TypesPointer Types
Pointer types contain the address of an identifier or dynamically allocated
memory. Pointer types require a double word (32 bits for storage).
While in protected mode, pointers contain a 32-bit offset and the segment
is assumed to be the data segment. Inthis way pointers are similar to the
integer type Longint. To allocate dynamic variables see the chapter on Heap
Management. A pointer type must point to specific type. Pointer types are
defined as follows:
^Typename
The pointer type can be assigned the constant nil. When nil is
assigned, the pointer does not refer to any location in memory. Pointer is
a predefined pointer type that is untyped. Pointer is compatible with all
other pointer types.
TMT Pascal supports the following arithmetical operations on pointers.
Examples:
p2 := p1 + 1000;
p1 := p2 - $FF;
inc(p1, 15);
dec(p2);
Where p1 and p2 are variables of Pointer Type.
|
|
|
Real Types |
Table of Content |
Pointer Dereference |
- 2.2.6.7 -