2015-08-14 13:38:01 +00:00
|
|
|
VAR global : INT;
|
|
|
|
|
|
|
|
PUB main() | i : INT
|
|
|
|
BEGIN
|
2015-08-14 21:53:51 +00:00
|
|
|
0 -> i;
|
|
|
|
# Print numbers from 1 to 5
|
|
|
|
WHILE ((i + 1) -> i) <= 5 DO
|
2015-08-15 22:45:12 +00:00
|
|
|
BEGIN
|
2015-08-14 21:53:51 +00:00
|
|
|
printInt(i);
|
2015-08-15 22:45:12 +00:00
|
|
|
sleep(20);
|
|
|
|
END
|
2015-08-14 13:38:01 +00:00
|
|
|
END
|
|
|
|
|
2015-08-14 15:12:08 +00:00
|
|
|
PUB fun() -> i : INT
|
2015-08-14 13:38:01 +00:00
|
|
|
BEGIN
|
2015-08-14 15:12:08 +00:00
|
|
|
10 -> i;
|
2015-08-14 13:38:01 +00:00
|
|
|
END
|