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,4 @@
uses objectclass;
define :class MyClass;
slot value = 1;
enddefine;

View file

@ -0,0 +1,13 @@
;;; Construct instance with default slot values
lvars instance1 = newMyClass();
;;; Construct instance with explicitely given slot values
lvars instance2 = consMyClass(15);
;;; Print slot value using dot notation
instance1.value =>
instance2.value =>
;;; Print slot value using funtional notation
value(instance1) =>
;;; Change slot value
12 -> value(instance1);
;;; Print it
value(instance1) =>

View file

@ -0,0 +1,6 @@
define :method reset(x : MyClass);
0 -> value(x);
enddefine;
reset(instance1);
;;; Print it
instance1 =>