Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,27 @@
OBJECT a_class
varA, varP
ENDOBJECT
-> this could be used like a constructor
PROC init() OF a_class
self.varP := 10
self.varA := 2
ENDPROC
-> the special proc end() is for destructor
PROC end() OF a_class
-> nothing to do here...
ENDPROC
-> a not so useful getter
PROC getP() OF a_class IS self.varP
PROC main()
DEF obj : PTR TO a_class
NEW obj.init()
WriteF('\d\n', obj.varA) -> this can be done, while
-> varP can't be accessed directly
WriteF('\d\n', obj.varP) -> or
WriteF('\d\n', obj.getP())
END obj
ENDPROC