9 Pascal keywords and operators supported by GNU Pascal.
This chapter lists all keywords understood by GNU Pascal. The
keywords are taken from the following standards and dialects:
ISO 7185 Pascal (CP)
ISO 10206 Extended Pascal (EP)
ANSI draft Object Pascal (OP)
UCSD Pascal (UCSD)
Borland Pascal 7.0 (BP)
Borland Delphi (BD)
Pascal-SC (PXSC, Pascal eXtensions for Scientific Calculations)
VAX Pascal (VP)
Sun Pascal (SP)
Traditional Macintosh Pascal (MP)
GNU Pascal extensions (GPC)
The table below lists all known keywords with short descriptions.
The links point to the longer descriptions in the reference.
By default (using GPC extensions) all keywords are enabled. Only
those are marked GPC in the table below that are valid
only in the GPC extensions.
All keywords that are specific to some dialects (i.e., not marked
“any”) can also be used as identifiers (with a few exceptions, see
below). Then, however, they generally cannot be used as keywords
anymore. So you can compile code from dialects that use them as
keywords and code that uses them as identifiers, i.e., you do not
have to modify your correct ISO 7185 programs in order to compile
them with GPC without any dialect option. Some words can even be
used as keywords and identifiers in parallel, including
forward (according to ISO 7185 Pascal), and near and
far (according to Borland Pascal).
The exceptions are:
Operator can't be used as a type, untyped constant or
exported interface, i.e. when it would be followed by =
(unless it's disabled as a keyword explicitly or by dialect options,
see below). This is because of a conflict with a definition of the
operator =. (It can be used as a typed constant, but it might
be confusing if you later decide to make it untyped, so use with
care.)
The first statement after initialization (Delphi
specific unit initialization) must not start with (.
(Statements starting with ( are uncommon, anyway, but not
impossible.) This does not restrict the usage of
Initialization as an identifier.
The following keywords can't be used immediately after
an import part: uses, implementation,
operator, constructor, destructor. Using
uses instead of import, or putting some other
declaration between import and the problematic keyword helps.
A dialect option turns off all keywords that do not belong to this
dialect. Besides, any keyword can be enabled and disabled with the
compiler options {$enable-keyword} and
{$disable-keyword}.
part of a while (see while) or for (see for) loop, a with (see with) statement, or a to begin do (see to begin do) or to end do (see to end do) module constructor or destructor
end of a code block, end of a case (see case) statement, end of a record (see record) or object (see object) declaration, part of a to end do (see to end do) module destructor
part of an array (see array), set (see set) or typed file (see file) type declaration, a case (see case) statement, a variant record (see record) type or a type of (see type of) type inquiry