example contributed by pdewacht.

This commit is contained in:
norayr 2017-06-02 21:52:31 +04:00
parent 9802b7e1fd
commit 37682dfdaf
6 changed files with 60 additions and 0 deletions

22
enums_example/0/test.Mod Normal file
View file

@ -0,0 +1,22 @@
MODULE test;
IMPORT Days, Out;
VAR today, yesterday, tomorrow: Days.Day;
BEGIN
today := Days.mon; (*init*)
yesterday := Days.Prev(today);
IF yesterday = Days.sun
THEN
Out.String("it works!"); Out.Ln
END;
tomorrow := Days.Next(today);
IF tomorrow = Days.tue
THEN
Out.String("it works!"); Out.Ln
END;
END test.