:
) IF
:
( ) (), ( ) .
S1 S2 -, S1→ S2 .
. - ( ) ,
- ,
, . , , + -, true false. , . , .
. , . , , . , , .
if 1 then
begin
if 2 then 1
end
else 2 1
) while Repeat.
while
while do
C while
, () while false. if, while .
Repeat while, , repeat , , while .
7
-
while B do S
B ( )
S
repeat S1; ; Sn until B
B ( )
:
For v:=e1 to e2 do s
v , e1, e2 , s .
:
, . s v.
, . , . , . , , . , . , |a|>E
: |ai|<eps
8
.
()
() :
|
|
(cardinal)
(integer)
(char)
(boolean)
(real)
()
()
(array)
(string)
(set)
(record)
(file)
(text)
, ; ( ).
string text.
.
: [ ]
: [Low(integer), High(integer)]
: , :
: integer x integer → integer
+, , *
div ( )
mod ( ) ,
: x
sqr(x) x2
abs(x) |x|
real → integer:
trunk(x)
round(x)
integer → boolean:
odd(x) (true , false )
:
≤ integer x integer → boolean
:
succ(x) x+1
pred(x) x1
ord(x)
, : , , .
:
: .
: a10b
:
[Low(real), High(real)]. ( ) .
:
Real x Real → Real
+, , *, / - real, real.
Real → Real
sin(x), cos(x), arctan(x), ln(x), sqr(x), sqrt(x), abs(x)
≤ Real x Real → Bolean
, real ().
.