Go to the first, previous, next, last section, table of contents.

# Keywords and operators supported by GNU Pascal

This chapter lists all keywords and operators understood by GNU Pascal.

## Keywords

By default, keywords can be redefined to make it possible that every correct ISO 7185 program can be compiled. However, you can use the compiler switches `--pascal-standard`, `--pascal-extended`, `--pascal-object`, `--pascal-borland`, and `--pascal-sc` to tell GPC that keywords of a given standard must not to be redefined.

The keywords are taken from the following standards:

- ISO 7185 Standard Pascal (SP)
- ISO 10206 Extended Pascal (EP)
- ANSI draft Object Pascal (OP) (not yet implemented)
- Borland Pascal 7.0 (BP)
- Pascal-SC (PXSC, Pascal eXtensions for Scientific Calculations)

    Keyword         Pascal standard        Remarks
    --------------------------------------------------------------------------
    Absolute        Borland                overload variables
    Abstract        Object                 not implemented
    All             GNU                    EP "export foo = all" extension
    And             ISO Standard
    And_then        ISO Extended           short-circuit Boolean AND operator
    Array           ISO Standard
    Asm             Borland, GNU           GNU-style assembler
    Begin           ISO Standard
    Bindable        ISO Extended           external binding of files, etc.
    Case            ISO Standard
    Class           Object                 not implemented
    Const           ISO Standard
    Constructor     Object, Borland        only BP version implemented
    Destructor      Object, Borland        only BP version implemented
    Div             ISO Standard
    Do              ISO Standard
    Downto          ISO Standard
    Else            ISO Standard
    End             ISO Standard
    Export          ISO Extended           Module Interface export
    File            ISO Standard
    For             ISO Standard
    Function        ISO Standard
    Goto            ISO Standard
    If              ISO Standard
    Import          ISO Extended           Module Interface import
    Implementation  ISO Extended, Borland  Module (EP) or Unit (BP) Impl. part
    Inherited       Object, Borland        only BP version implemented
    In              ISO Standard
    Inline          Borland, GNU           only GNU inline functions implem.
    Interface       ISO Extended, Borland  Module (EP) or Unit (BP) Int. part
    Is              Object                 not implemented
    Label           ISO Standard
    Mod             ISO Standard
    Module          ISO Extended, PXSC     PXSC version only partially implem.
    Nil             ISO Standard
    Not             ISO Standard
    Object          Borland                BP 7.0 style class definition
    Of              ISO Standard
    Only            ISO Extended           import specification
    Operator        PXSC                   operator definition
    Or              ISO Standard
    Or_else         ISO Extended           short-circuit Boolean OR operator
    Otherwise       ISO Extended           default case label
    Packed          ISO Standard           does not yet pack
    Pow             ISO Extended           exponentiation op. (integer expon.)
    Procedure       ISO Standard
    Program         ISO Standard
    Property        Object                 not implemented
    Protected       ISO Extended           read-only formal parameters
    Qualified       ISO Extended           import specification
    Record          ISO Standard
    Repeat          ISO Standard
    Restricted      ISO Extended           type specification
    Set             ISO Standard
    Shl             Borland                left bit-shift operator
    Shr             Borland                right bit-shift operator
    Then            ISO Standard
    To              ISO Standard
    Type            ISO Standard
    Unit            Borland                Borland (or UCSD) style Modules
    Until           ISO Standard
    Uses            Borland                Borland (or UCSD) style import
    Value           ISO Extended           variable initializer
    Var             ISO Standard
    View            Object                 not implemented
    Virtual         Borland, Object        only Borland version implemented
    While           ISO Standard
    With            ISO Standard
    Xor             Borland                Boolean/bitwise exclusive OR op.

## Operators

GNU Pascal operators, ordered by precedence.

The PXSC operators ``+<'`, ``-<'`, etc. are not implemented into GNU Pascal but may be defined by the user. If you do so and meet the PXSC requirements, please let us know. The other real operators do not meet PXSC requirements.

The Object Pascal operator ``IS'` is not implemented.

    :=
    <    =    >    IN   <>   >=   <=
    +    -    OR   +<   -<   +>   ->
    *    /    DIV  MOD  AND  SHL  SHR  XOR  *<   /<   *>   />
    POW  **   IS
    NOT

Go to the first, previous, next, last section, table of contents.