Ниже представлен список зарезервированных слов, применяемых в языке программирования Pascal.
Вы можете использовать этот синтаксис в приложениях для TechEditor.
Reserved word | Description | Example (Pascal) |
---|---|---|
and | boolean operator (conjunction) | if (x > 0) and (x < 10) then Init; |
array | array type declaration | var A: array[0..10] of string; |
as | ||
begin | begin end; | |
case | case i of 1: w := 2.2; 2: w := 4.0; 3: w := 6.7; end; | |
const | const F1=15; | |
div | t := x div 2; | |
do | for i := 1 to 5 do begin end; | |
downto | for i := 5 downto 1 do begin end; | |
else | if a = b then i := 1 else i := -1; | |
end | begin end; | |
except | ||
exports | ||
for | loop-operator - for | for i := 1 to 5 do begin end; |
function | starts function declaration | function F(x: Double): Double; begin end; |
if | if a < 5 then ShowValue; | |
in | ||
mod | if (i mod 3 = 0) then Recalc; | |
nil | if Form = nil then CreateForm; | |
not | boolean operator (negation) | if not Check then ShowError; |
of | var V: array[0..2] of Double; | |
or | boolean operator (disjunction) | if (a = 2) or (a = 4) then Reset; |
procedure | starts procedure declaration | procedure Calculate; begin end; |
raise | ||
repeat | repeat Inc(i); until i > 4; | |
set | ||
shl | logical (bitwise) operator - bitwise shift left | if X shl 2 then Proc1; |
shr | logical (bitwise) operator - bitwise shift right | if Y shr I then Proc2; |
string | string type declaration | var s: string; |
then | if a = b then i := 1; | |
to | for i := 1 to 5 do ... | |
try | ||
until | repeat Inc(i); until i > 4; | |
uses | keyword defines a list of one or more units that are used by the current unit | uses Dialogs; |
var | var i; | |
while | loop-operator - while | while A <> B do begin Inc(A); end; |
xor | boolean operator (exclusive disjunction) | if (a = b) xor (c = d) then Restart; |