mirror of
https://github.com/vishapoberon/oberonbyexample.git
synced 2026-04-05 21:02:25 +00:00
forgot to re-add while loop
This commit is contained in:
parent
2eb0c1bc2f
commit
e49b38df73
2 changed files with 27 additions and 0 deletions
10
while/Makefile
Normal file
10
while/Makefile
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
VOC = /opt/voc/bin/voc
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(VOC) -m While.Mod
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm *.c
|
||||||
|
rm *.h
|
||||||
|
rm *.o
|
||||||
|
rm *.sym
|
||||||
17
while/While.Mod
Normal file
17
while/While.Mod
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
MODULE while;
|
||||||
|
|
||||||
|
IMPORT Out;
|
||||||
|
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i : INTEGER;
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
i := 0;
|
||||||
|
Out.String("WHILE loop started"); Out.Ln;
|
||||||
|
WHILE i < 10 DO
|
||||||
|
i := i + 1;
|
||||||
|
Out.Int(i, 0); Out.Ln;
|
||||||
|
END;
|
||||||
|
END while.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue