aUCBLogo Demos and Tests / testobj2
be testobj2
ct
local [t1 t2 t o w l a fa]
t1=Table [a 1 b 2]
t2=Table [c 1 d 2]
t=Table (List "e t1 "f t2)
o=Box 1
(o'init 10)
(o'add 3)
o2=Box 1
(o2'init 11)
(o2'add 4)
pr o
pr o2
w="Hallo
this is a
multiline text
l=(List 12 "abc [c d])
; ::a={1234 0}
; a.2=w
a=Array 2
a.1={a b}
a.2={true d}
; formls=[[[a b][c d]][d e]]
; o2=Rect 11 21 31 41
fa=FloatArray {1.2 3.4 4.5}
a.1={1 2}
end
be Point x y
end
be Rect x y w h
inherit Point x y
end
be Box l
inherit Point l+20 l+30
local [b x]
b=[]
x=0
if l > 0
[ b=Box l-1
]
be init x0
x=x0
if b != []
[ (b'init x+1)
]
end
be add a
x=x+a
if b != []
[ (b'add a)
]
end
end