RosettaCodeData/Task/Classes/Pop11/classes-2.pop11
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

13 lines
396 B
Text

;;; 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) =>