Next: , Previous: Reference, Up: Top



9 Pascalove ključne riječi i operatori podržani u GNU Pascalu.

Ovo poglavlje daje popis svih ključnih riječi koje GNU Pascal razumije.

Ključne riječi su preuzete iz slijedećih standarda:

Tablica niže navodi sve poznate ključne riječi s kratkim opisom svake. Link pokazuje prema duljem opisu u referentnom priručniku.

Inicijalno (uz korištenje GPC ekstenzija) su sve riječi omogućene. Samo one označene sa GPC su ispravne samo u GPC ekstenzijama.

Sve ključne riječi koje su specifične za neke dijalekte (odnosno nisu označene sa “svi” mogu se također koristiti kao identifikatori (uz nekoliko izuzetaka, vidi niže). Ipak, one se općenito više ne mogu koristiti kao ključne riječi nakon toga. Tako možete prevoditi kod iz dijalekata koji ih koriste kao ključne riječi i kod koji ih koristi kao identifikatore, tj. ne morate modificirati vaše korektne ISO 7185 programe da biste ih preveli s GPC-om bez ijedne opcije za dijalekt. Neke riječi se čak mogu koristiti kao ključne riječi i kao identifikatori paralelno, uključujući forward (prema ISO 7185 Pascalu), te near i far (prema Borland Pascalu).

Izuzeci su:

Opcija dijalekta onemogućuje sve ključne riječi koje ne pripadaju dotičnom dijalektu. Osim toga, svaka ključna riječ može biti omogućena i onemogućena opcijama prevodioca {$enable-keyword} i {$disable-keyword}.

(Napomena: Tablica nije prevedena jer se generira automatski, kao i zbog stručnosti termina i izraza, za koje je teško pronaći adekvatni prijevod).

absolute (BP, BD) (see absolute)
overloaded variable declaration
abstract (OP) (see abstract)
abstract object type or method declaration
all (all) (see all)
export (see export) extension (export foo = all)
and (any) (see and)
Boolean or bitwise and operator or part of the and then (see and then) operator
and_then (EP, OP) (see and_then)
short-circuit Boolean and (see and) operator
array (any) (see array)
array type declaration
as (OP, BD) (see as)
object type membership test and conversion
asm (BP, BD) (see asm)
GNU style inline assembler code
asmname (GPC) (see asmname)
DEPRECATED! linker name of routines and variables
attribute (GPC) (see attribute)
attributes of routines and variables
begin (any) (see begin)
begin of a code block, part of a to begin do (see to begin do) module constructor
bindable (EP, OP) (see bindable)
external bindability of files
c (GPC) (see c)
DEPRECATED! declaration of external routine
case (any) (see case)
multi-branch conditional statement or variant record (see record) type
c_language (GPC) (see c_language)
DEPRECATED! declaration of external routine
class (OP, BD) (see class)
OOE/Delphi style object class (not yet implemented)
const (any) (see const)
constant declaration or constant parameter declaration
constructor (OP, BP, BD) (see constructor)
object constructor
destructor (OP, BP, BD) (see destructor)
object destructor
div (any) (see div)
integer division operator
do (any) (see do)
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
downto (any) (see downto)
part of a for (see for) loop counting downwards
else (any) (see else)
alternative part of an if (see if) statement, default case (see case) branch, part of the or else (see or else) operator
end (any) (see end)
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
export (export) (see export)
module interface export
exports (BP, BD) (see exports)
library export (not yet implemented)
external (UCSD, BP, BD, MP) (see external)
declaration of an external object
far (BP, BD) (see far)
BP directive (ignored)
file (any) (see file)
non-text file type declaration
finalization (BD) (see finalization)
unit finalization
for (any) (see for)
loop statement where the number of loops is known in advance
forward (any) (see forward)
declaration of a routine whose definition follows below
function (any) (see function)
function declaration
goto (any) (see goto)
statement to jump to a label (see label)
if (any) (see if)
conditional statement
implementation (all except CP) (see implementation)
module or unit implementation part
import (EP, OP) (see import)
module interface import
in (any) (see in)
set membership test or part of a for (see for) loop iterating through sets
inherited (OP, BP, BD, MP) (see inherited)
reference to methods of ancestor object types
initialization (BD) (see initialization)
unit initialization
interface (interface) (see interface)
module or unit interface part
interrupt (BP, BD) (see interrupt)
interrupt handler declaration (not yet implemented)
is (OP, BD) (see is)
object type membership test
label (any) (see label)
label declaration for a goto (see goto) statement
library (BP, BD) (see library)
library declaration (not yet implemented)
mod (any) (see mod)
integer remainder operator
module (module) (see module)
EP style or PXSC style module
name (name) (see name)
linker name
near (BP, BD) (see near)
BP directive (ignored)
nil (any) (see nil)
reserved value for unassigned pointers
not (any) (see not)
Boolean or bitwise negation operator
object (BP, BD, MP) (see object)
BP style object declaration
of (any) (see of)
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
only (EP, OP) (see only)
import specification
operator (PXSC) (see operator)
operator declaration
or (any) (see or)
Boolean or bitwise or operator or part of the or else (see or else) operator
or_else (EP, OP) (see or_else)
short-circuit Boolean or (see or) operator
otherwise (EP, OP, MP) (see otherwise)
default case (see case) branch, default value in a structured value of array (see array) type
packed (any) (see packed)
declaration of packed structured types (record (see record), array (see array), set (see set), file (see file)), also packed ordinal subranges
pow (EP, OP) (see pow)
exponentiation operator with integer exponent
private (private) (see private)
private object fields
procedure (any) (see procedure)
procedure declaration
program (any) (see program)
start of a Pascal program
property (OP, BD) (see property)
object properties (not yet implemented)
protected (protected) (see protected)
read-only formal parameters or module export and protected object fields
public (public) (see public)
public object fields
published (published) (see published)
published object fields
qualified (EP, OP) (see qualified)
import specification
record (any) (see record)
record type declaration
repeat (any) (see repeat)
loop statement
resident (BP, BD) (see resident)
library export specification (not yet implemented)
restricted (EP, OP) (see restricted)
restricted type specification
segment (UCSD) (see segment)
segment specification (not yet implemented)
set (any) (see set)
set type declaration
shl (BP, BD, MP) (see shl)
bitwise left shift operator
shr (BP, BD, MP) (see shr)
bitwise right shift operator
then (any) (see then)
part of an if (see if) statement or part of the and then (see and then) operator
to (any) (see to)
part of a for (see for) loop counting upwards or a to begin do (see to begin do) or to end do (see to end do) module constructor or destructor
type (any) (see type)
type declaration or part of a type of (see type of) type inquiry
unit (UCSD, BP, BD, MP) (see unit)
UCSD and BP style unit declaration
until (any) (see until)
end of a repeat (see repeat) statement
uses (UCSD, BP, BD, MP) (see uses)
unit import
value (EP, OP) (see value)
variable/type initializer
var (any) (see var)
variable declaration or reference parameter declaration
view (OP) (see view)
object class view (not yet implemented)
virtual (OP, BP, BD, MP) (see virtual)
virtual object method declaration
while (any) (see while)
loop statement
with (any) (see with)
automatic record (see record) or object field access
xor (BP, BD, MP) (see xor)
Boolean or bitwise exclusive or operator