mirror of
https://github.com/vishapoberon/oberonbyexample.git
synced 2026-04-05 21:02:25 +00:00
intro to CASE and ArgC
This commit is contained in:
parent
9802b7e1fd
commit
95445d3d69
2 changed files with 24 additions and 0 deletions
14
case/Case.Mod
Normal file
14
case/Case.Mod
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
MODULE case;
|
||||
|
||||
|
||||
IMPORT Out, Modules;
|
||||
|
||||
|
||||
BEGIN
|
||||
CASE Modules.ArgCount - 1 OF
|
||||
0 : Out.String("There are no arguments");
|
||||
| 1 : Out.String("There is one argument");
|
||||
| 2 : Out.String("There are two arguments");
|
||||
ELSE Out.String("There are more than two arguments") END;
|
||||
Out.Ln;
|
||||
END case.
|
||||
10
case/Makefile
Normal file
10
case/Makefile
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
VOC = /opt/voc/bin/voc
|
||||
|
||||
all:
|
||||
$(VOC) -m Case.Mod
|
||||
|
||||
clean:
|
||||
rm *.c
|
||||
rm *.h
|
||||
rm *.o
|
||||
rm *.sym
|
||||
Loading…
Add table
Add a link
Reference in a new issue