10. Pascal keywords and operators supported by GNU Pascal.
This chapter lists all keywords understood by GNU Pascal.
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 dialect switches (e.g., --extended-pascal
or
--borland-pascal
) to tell GPC that keywords of a given
standard must not be redefined.
The keywords are taken from the following standards:
-
ISO 7185 Pascal (SP)
-
ISO 10206 Extended Pascal (EP)
-
ANSI draft Object Pascal (OP)
-
USCD Pascal (USCD)
-
Borland Pascal 7.0 (BP)
-
Borland Delphi (BD)
-
Pascal-SC (PXSC, Pascal eXtensions for Scientific Calculations)
-
VAX Pascal (VP)
-
GNU Pascal extensions (GPC)
In GPC you are free to re-define everything that is not a reserved
word in ISO 7185 Pascal in your program or the dialect selected.
E.g., you do not have to modify your code for GPC if you have an
identifier like Restricted
or Value
or some such,
unless you compile with the `--extended-pascal' option.
The following table lists all known keywords with short
descriptions. The links point to the longer descriptions in the
reference.
- absolute (BP, BD, GPC) (see section 9.2 absolute)
-
overloaded variable declaration
- abstract (OP, GPC) (see section 9.3 abstract)
-
abstract object type or method declaration
- all (GPC) (see section 9.6 all)
-
`export' (see section 9.79 export) extension (`export foo = all')
- and (any) (see section 9.7 and)
-
Boolean or bitwise `and' operator or part of the `and then' (see section 9.8 and then) operator
- and_then (EP, OP, GPC) (see section 9.9 and_then)
-
short-circuit Boolean `and' (see section 9.7 and) operator
- array (any) (see section 9.14 array)
-
array type declaration
- as (OP, BD, GPC) (see section 9.15 as)
-
object type membership test and conversion
- asm (BP, BD, GPC) (see section 9.16 asm)
-
GNU style inline assembler code
- asmname (GPC) (see section 9.17 asmname)
-
linker name of routines and variables
- attribute (GPC) (see section 9.20 attribute)
-
attributes of routines and variables
- begin (any) (see section 9.21 begin)
-
begin of a code block, part of a `to begin do' (see section 9.278 to begin do) module constructor
- bindable (EP, OP, GPC) (see section 9.23 bindable)
-
external bindability of files
- case (any) (see section 9.38 case)
-
multi-branch conditional statement or variant `record' (see section 9.222 record) type
- class (OP, BD, GPC) (see section 9.43 class)
-
OOE/Delphi style object class (not yet implemented)
- const (any) (see section 9.50 const)
-
constant declaration or constant parameter declaration
- constructor (OP, BP, BD, GPC) (see section 9.51 constructor)
-
object constructor
- destructor (OP, BP, BD, GPC) (see section 9.62 destructor)
-
object destructor
- div (any) (see section 9.64 div)
-
integer division operator
- do (any) (see section 9.65 do)
-
part of a `while' (see section 9.301 while) or `for' (see section 9.95 for) loop, a `with' (see section 9.302 with) statement, or a `to begin do' (see section 9.278 to begin do) or `to end do' (see section 9.279 to end do) module constructor or destructor
- downto (any) (see section 9.67 downto)
-
part of a `for' (see section 9.95 for) loop when counting downwards
- else (any) (see section 9.68 else)
-
alternative part of an `if' (see section 9.110 if) statement, default `case' (see section 9.38 case) label or part of the `or else' (see section 9.182 or else) operator
- end (any) (see section 9.70 end)
-
end of a code block, end of a `case' (see section 9.38 case) statement, end of a `record' (see section 9.222 record) or object declaration, part of a `to end do' (see section 9.279 to end do) module destructor
- export (EP, OP, BP, BD, GPC) (see section 9.79 export)
-
module interface export
- exports (BP, BD, GPC) (see section 9.80 exports)
-
library export (not yet implemented)
- external (UCSD, BP, BD, GPC) (see section 9.84 external)
-
declaration of external objects
- file (any) (see section 9.88 file)
-
non-text file type declaration
- for (any) (see section 9.95 for)
-
loop statement where the number of loops is known in advance
- forward (UCSD, BP, BD, GPC) (see section 9.97 forward)
-
declaration of a routine whose definition follows below
- function (any) (see section 9.101 function)
-
function declaration
- goto (any) (see section 9.106 goto)
-
statement to jump to a `label' (see section 9.130 label)
- if (any) (see section 9.110 if)
-
conditional statement
- import (EP, OP, GPC) (see section 9.113 import)
-
module interface import
- implementation (NOT_SP) (see section 9.112 implementation)
-
module or unit implementation part
- in (any) (see section 9.114 in)
-
set membership test or part of a `for' (see section 9.95 for) loop when iterating through sets
- inherited (OP, BP, BD, GPC) (see section 9.118 inherited)
-
reference to methods of ancestor object types
- inline (GPC) (see section 9.120 inline)
-
declaration of inline routines
- interface (NOT_SP) (see section 9.126 interface)
-
module or unit interface part
- interrupt (BP, BD) (see section 9.127 interrupt)
-
interrupt handler declaration (not yet implemented)
- is (OP, BD, GPC) (see section 9.129 is)
-
object type membership test
- label (any) (see section 9.130 label)
-
label declaration for a `goto' (see section 9.106 goto) statement
- library (BP, BD, GPC) (see section 9.134 library)
-
library declaration (not yet implemented)
- mod (any) (see section 9.162 mod)
-
integer remainder operator
- module (EP, OP, GPC) (see section 9.163 module)
-
EP style or PXSC style module
- nil (any) (see section 9.172 nil)
-
reserved value for unassigned pointers
- not (any) (see section 9.173 not)
-
Boolean or bitwise `not' operator
- object (BP, BD, GPC) (see section 9.175 object)
-
BP style object declaration
- of (any) (see section 9.177 of)
-
part of an `array' (see section 9.14 array), `set' (see section 9.244 set) or typed `file' (see section 9.88 file) type declaration, a `case' (see section 9.38 case) statement, a variant `record' (see section 9.222 record) type or a `type of' (see section 9.285 type of) type inquiry
- only (EP, OP, GPC) (see section 9.178 only)
-
import specification
- operator (PXSC, GPC) (see section 9.179 operator)
-
operator declaration
- or (any) (see section 9.180 or)
-
Boolean or bitwise `or' operator or part of the `or else' (see section 9.182 or else) operator
- or_else (EP, OP, GPC) (see section 9.183 or_else)
-
short-circuit Boolean `or' (see section 9.180 or) operator
- otherwise (EP, OP, GPC) (see section 9.184 otherwise)
-
default case label
- packed (any) (see section 9.188 packed)
-
declaration of packed `record' (see section 9.222 record) or `array' (see section 9.14 array) types, also packed ordinal subranges
- pow (EP, OP, GPC) (see section 9.200 pow)
-
exponentiation operator with integer exponent
- private (BP, BD, GPC) (see section 9.202 private)
-
private object fields
- procedure (any) (see section 9.203 procedure)
-
procedure declaration
- program (any) (see section 9.204 program)
-
start of a Pascal program
- property (OP, BD, GPC) (see section 9.205 property)
-
variable properties (not yet implemented)
- protected (EP, OP, BD, GPC) (see section 9.206 protected)
-
read-only formal parameters and protected object fields
- public (BP, BD, GPC) (see section 9.211 public)
-
public object fields
- published (BP, BD, GPC) (see section 9.212 published)
-
published object fields
- qualified (EP, OP, GPC) (see section 9.214 qualified)
-
import specification
- record (any) (see section 9.222 record)
-
structured type declaration
- repeat (any) (see section 9.226 repeat)
-
loop statement
- resident (BP, BD) (see section 9.228 resident)
-
library export specification (not yet implemented)
- restricted (EP, OP, GPC) (see section 9.229 restricted)
-
restricted type specification
- segment (UCSD) (see section 9.242 segment)
-
segment specification (not yet implemented)
- set (any) (see section 9.244 set)
-
set type declaration
- shl (BP, BD, GPC) (see section 9.248 shl)
-
bitwise left shift operator
- shr (BP, BD, GPC) (see section 9.254 shr)
-
bitwise right shift operator
- static (GPC) (see section 9.265 static)
-
static variable declaration
- then (any) (see section 9.274 then)
-
part of an `if' (see section 9.110 if) statement or part of the `and then' (see section 9.8 and then) operator
- to (any) (see section 9.277 to)
-
part of a `for' (see section 9.95 for) loop when counting upwards or a `to begin do' (see section 9.278 to begin do) or `to end do' (see section 9.279 to end do) module constructor or destructor
- type (any) (see section 9.284 type)
-
type declaration or part of a `type of' (see section 9.285 type of) type inquiry
- unit (UCSD, BP, BD, GPC) (see section 9.288 unit)
-
UCSD and BP style unit declaration
- until (any) (see section 9.290 until)
-
end of a `repeat' (see section 9.226 repeat) statement
- uses (UCSD, BP, BD, GPC) (see section 9.293 uses)
-
unit import
- value (EP, OP, GPC) (see section 9.295 value)
-
variable initializer
- var (any) (see section 9.296 var)
-
variable declaration or reference parameter declaration
- view (OP, GPC) (see section 9.297 view)
-
object class view (not yet implemented)
- virtual (OP, BP, BD, GPC) (see section 9.298 virtual)
-
virtual object method declaration
- volatile (GPC) (see section 9.300 volatile)
-
volatile variable declaration
- while (any) (see section 9.301 while)
-
loop statement
- with (any) (see section 9.302 with)
-
automatic `record' (see section 9.222 record) or object field access
- xor (BP, BD, GPC) (see section 9.308 xor)
-
Boolean or bitwise `exclusive or' operator
This document was generated
by Frank Heckenbach on May, 10 2002
using texi2html