aUCBLogo Demos and Tests / testobj5
be testobj5
be dummy x y
be add b
local [x2 y2]
x2=x+b'x
y2=y+b'y
x=x2
y=y2
output dummy x y
end
be sum [l]
local [n]
n=count l
ignore add first l
if n==1 [output this]
output (sum2 butFirst l)
end
be sum2 l
local [n]
n=count l
ignore add first l
if n==1 [output this]
output (sum2 butFirst l)
end
end
a=dummy 2 3
b=dummy 4 5
print (a'add b)
print (a'sum b a b a b)
end