changed the syntax for clarity - attribute list to use a tuple, class variable list to use a normal parenthesized list
This commit is contained in:
@ -15,7 +15,7 @@ fun Number: ~= (oprnd) { return (~= self oprnd) }
|
||||
class A {
|
||||
var a b c
|
||||
|
||||
fun(#ci) newInstance(x y z) {
|
||||
fun[#ci] newInstance(x y z) {
|
||||
set a x;
|
||||
set b y;
|
||||
set c z;
|
||||
@ -30,7 +30,7 @@ class A {
|
||||
class B: A {
|
||||
var d e f
|
||||
|
||||
fun(#ci) newInstance(x y z) {
|
||||
fun[#ci] newInstance(x y z) {
|
||||
super:newInstance (* x 2) (* y 2) (* z 2);
|
||||
set d x;
|
||||
set e y;
|
||||
@ -38,9 +38,9 @@ class B: A {
|
||||
return self;
|
||||
};
|
||||
|
||||
fun(#c) getSuper() { return super; };
|
||||
###fun(#c) getSuperclass() { return (self:superclass); };
|
||||
fun(#c) getSelf() { return self; };
|
||||
fun[#c] getSuper() { return super; };
|
||||
###fun[#c] getSuperclass() { return (self:superclass); };
|
||||
fun[#c] getSelf() { return self; };
|
||||
|
||||
fun sum() {
|
||||
return (+ (super:get-a) (super:get-b) (super:get-c) self.d self.e self.f);
|
||||
|
Reference in New Issue
Block a user