mirror of
https://github.com/vishapoberon/oberonbyexample.git
synced 2026-04-05 21:02:25 +00:00
intro to consts
This commit is contained in:
parent
2629af8bbb
commit
d50a785039
2 changed files with 24 additions and 0 deletions
14
constants/Constants.Mod
Normal file
14
constants/Constants.Mod
Normal 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
10
constants/Makefile
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
VOC = /opt/voc/bin/voc
|
||||
|
||||
all:
|
||||
$(VOC) -m Constants.Mod
|
||||
|
||||
clean:
|
||||
rm *.c
|
||||
rm *.h
|
||||
rm *.o
|
||||
rm *.sym
|
||||
Loading…
Add table
Add a link
Reference in a new issue