Language:
Русский
English
end (reserved word)
The reserved word end is used with
- begin to form compound statements
- case to form case statements
- record to declare record types
- object to declare object types
- asm to call the built-in assembler
Examples
(* with "begin" to form compound statement *)
if First < Last then
begin
Temp := First;
First := Last;
Last := Temp;
end;
(* with "case" statement *)
case Ch of
'A'..'Z', 'a'..'z': WriteLn('Letter');
'0'..'9': WriteLn('Digit');
'+', '-', '*', '/': WriteLn('Operator');
else
WriteLn('Special character');
end;
(* with record type definitions *)
type
Class = (Num, Dat, Str);
Date = record
D, M, Y: Integer;
end;
Facts = record
Name: string[10];
case Kind: Class of
Num: (N: real);
Dat: (D: Date);
Str: (S: string);
end;
(* with object type definitions *)
type
LocationPtr = ^Location;
Location = object
X, Y: Integer;
procedure Init(PX, PY: Integer);
function GetX: Integer;
function GetY: Integer;
end;
(* with asm *)
asm
mov ax,1
mov cx, 100
end;