[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
pointer type identifier = ^type identifier; |
A pointer of the type pointer type identifier holds the address at which data of the type type identifier is situated. Unlike other identifier declarations, where all identifiers in definition part have to be declared before, in a pointer type declaration type identifier may be declared after pointer type identifier. The data pointed to is accessed by `pointer type variable^'. To mark an unassigned pointer, the `nil' constant (which stands for "not in list") has to be assigned to it, which is compatible with all pointer types.
type ItselfFoo = ^ItselfFoo; { possible but senseless } |
GPC also suports pointers to procedures or function and calls through them. This is a non-standard feature.
program ProcPtrDemo (Output); |
See also: section 8.2.9 Pointer (Intrinsic).