mirror of
https://github.com/vishapoberon/oberonbyexample.git
synced 2026-04-05 21:02:25 +00:00
intro to types
This commit is contained in:
parent
c78b89c825
commit
52d6d3808b
2 changed files with 22 additions and 0 deletions
10
value-types/Makefile
Normal file
10
value-types/Makefile
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
VOC = /opt/voc/bin/voc
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(VOC) -m Values.Mod
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm *.c
|
||||||
|
rm *.h
|
||||||
|
rm *.o
|
||||||
|
rm *.sym
|
||||||
12
value-types/Values.Mod
Normal file
12
value-types/Values.Mod
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
MODULE values;
|
||||||
|
|
||||||
|
|
||||||
|
IMPORT Out;
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
Out.String("Oberon has types, for example, I am a string type (ARRAY OF CHAR);"); Out.Ln;
|
||||||
|
Out.String("There are also other types, e.g. INTEGERs and BOOLEANs"); Out.Ln;
|
||||||
|
Out.Int(42, 0);
|
||||||
|
Out.Ln
|
||||||
|
END values.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue