aUCBLogo Demos and Tests / testobj3
be testobj3
be myNumber :a
be add :b
ifelse Number? :b
[ tmp=sum :a :b
][ tmp=sum :a :b'a
]
run :expr1
(type "+)
run :expr2
output myNumber :tmp
end
local [expr1 expr2]
expr1=[(type :a)]
expr2=[(type ifelse Number? :b [:b][:b'a] "= :tmp) (print)]
end
a=myNumber 2
b=myNumber 5
ignore (((a'add 3)'add 4)'add (b'add 6))
end