intro to consts

This commit is contained in:
antranigv 2017-06-02 16:46:05 +04:00
parent 2629af8bbb
commit d50a785039
No known key found for this signature in database
GPG key ID: 60686B14DAB81456
2 changed files with 24 additions and 0 deletions

14
constants/Constants.Mod Normal file
View file

@ -0,0 +1,14 @@
MODULE constants;
IMPORT Out;
CONST
s = "if it moves, compile it!";
n = 42;
m = n * 2;
BEGIN
Out.String(s); Out.Ln;
Out.Int(n, 0); Out.Ln;
Out.Int(m, 0); Out.Ln;
END constants.

10
constants/Makefile Normal file
View file

@ -0,0 +1,10 @@
VOC = /opt/voc/bin/voc
all:
$(VOC) -m Constants.Mod
clean:
rm *.c
rm *.h
rm *.o
rm *.sym