@c Copyright (C) 1996-2004 Free Software Foundation, Inc.
@c For copying conditions, see the file gpc.texi.
@c This file is part of the GPC Manual.
@c
@c Authors: Peter Gerwinski <peter@gerwinski.de>
@c          Frank Heckenbach <frank@pascal.gnu.de>
@c
@c Last modification: 2004-01-01 (file up to date)

@node Keywords
@chapter 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:

@itemize @bullet
@item ISO 7185 Pascal (CP)
@item ISO 10206 Extended Pascal (EP)
@item ANSI draft Object Pascal (OP)
@item UCSD Pascal (UCSD)
@item Borland Pascal 7.0 (BP)
@item Borland Delphi (BD)
@item Pascal-SC (PXSC, Pascal eXtensions for Scientific Calculations)
@item VAX Pascal (VP)
@item Sun Pascal (SP)
@item Traditional Macintosh Pascal (MP)
@item GNU Pascal extensions (GPC)
@end itemize

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 @samp{GPC} in the table below that are valid
@emph{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
@samp{forward} (according to ISO 7185 Pascal), and @samp{near} and
@samp{far} (according to Borland Pascal).

The exceptions are:

@itemize @bullet
@item @samp{Operator} can't be used as a type, untyped constant or
exported interface, i.e. when it would be followed by @samp{=}
(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 @samp{=}. (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.)

@item The first statement after @samp{initialization} (Delphi
specific unit initialization) must not start with @samp{(}.
(Statements starting with @samp{(} are uncommon, anyway, but not
impossible.) This does not restrict the usage of
@samp{Initialization} as an identifier.

@item The following keywords can't be used @emph{immediately} after
an @samp{import} part: @samp{uses}, @samp{implementation},
@samp{operator}, @samp{constructor}, @samp{destructor}. Using
@samp{uses} instead of @samp{import}, or putting some other
declaration between @samp{import} and the problematic keyword helps.
@end itemize

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 @samp{@{$enable-keyword@}} and
@samp{@{$disable-keyword@}}.

@include keyword.texi
