Notifications
Clear all
[Closed] appending arrays
Oct 06, 2005 2:14 pm
Hi all
I am having a problem with arrays. There is an example below
thearray = #()
For i = 1 to myset.count do
(
myobj = myset[i]
append thearray myobj
)
myset contains 10 teapots. When i use the append function only 1 teapot is added to the array.
Has anyone any ideas on how to get around this
regards
Nebille
1 Reply
Oct 06, 2005 2:14 pm
the code looks ok although it could also be written as
thearray = #()
For obj in myset do
(
append thearray obj
)
which is a little quicker
try looking at myset in the listener window to see what it contains. I’m guessing it doesn’t contain the data you expect it does.