appending arrays


#1

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


#2

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.


#3

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.