. . .
, -
( ( )) .
, .
, , , ..
( ) ( )
, , . .
, ( , , , ).
, , , .
(Go to) , - , .
, .
. , .
, , begin end;
, .
if.
- .
.
IF:
If <> then P1 else P2;
If <> then P1;
If (<1>) or (<2>) then P1 else P2;
If (<1>) and (<2>) then P1 else P2;
<>,<1>, <2> - . 1, 2 - .
if |
then |
else |
case.
case . -, , , . , , else. else , , end, . . case.
|
|
( 32768..32767): ,
case |
of |
: |
; |
else |
end |
For.
for |
for |
:= |
for |
to |
for |
:= |
do |
downto |
for |
for |
For , . , downto , . . succ (pred). , , .
for .
, .
Repeat.
Repeat , until true.
repeat |
until |
repeat begin end. Repeat , , ,
. , .
While.
while |
do |
, true, , , . , . , , .
. .
Pascal ( ). , . (, const, type, var, ). .
:
|
|
function < >(< >): ;
function < >(< >): ;
forward;
var < : >
begin
< >
end;
begin. forward. , , forward .
:
procedure < >;
procedure < >;
forward;
var < : >
begin
< >
end;
:
[uses < >];
[label < >];
[const <> = <>];
[type <>:<>];
[var <>:<>];
[procedure <>];
[function <>(<>:< >):< >]
begin
<>
end;
forward, function/procedure. . , . , . , var .
, , . .