alg
begin
int i,j
real r,f,d
string s
char c, c1, c2, c3, c4
bool l, b

int array ia[1:2]
real array ra[1:2]
string array sa[1:2]
char array ca[1:2]
bool array ba[1:2]

int   array  ia1[1:2]
real   array  ra1[1:2]
string   array  sa1[1:2]
char   array  ca1[1:2]
bool  array  ba1[1:2]

intarray ia2[1:2]
realarray ra2[1:2]
stringarray sa2[1:2]
chararray ca2[1:2]
boolarray ba2[1:2]
i := 5
if i=5
then print "Yes", nl
else print "No", nl
end_if

switch
case not (i=4): print "!4", nl
case i=5: print 5, nl
case i=5 or i<>5 and i=5: print "", nl
end_switch

do for j from 1 to 2 step 1
end_do

do 2 times
end do

do while false
end  do

do
end_do_at true
do
end do at true
do
end  do   at    true

do
break
end_do

assert not false
assert true and true
assert true or false

c1:='a'; c2:='b'; c3:='c';
assert vspom(1,r,c1,c2,c3) > 0
mmA

print real_to_str(1.2), nl
print time, nl
assert length("123")=3
assert sign(-5)=-1
print code('h'), nl
print str_to_real("123",b), nl
print str_to_int("123",b), nl
assert max(4,5)=5
assert min(4,5)=4
assert abs(-5)=5
assert symbol(100)=symbol2(100)
print rnd(10), nl
print int_to_str(2), nl
print unicode("@")
end

alg int vspom (arg int a1, res real a2, argres char a3, arg res char a4, arg  res  char  a5)
#grethtrhre
pre a1>0
post a1>0
begin
value := 1
end

module MyModule

alg mmA
begin
print "In MyModule", nl
end

alg a7
begin
int i
i := key
scan i
pause
stop
end

end_module

