localobj array

Anything that doesn't fit elsewhere.
Post Reply
pfortier
Posts: 47
Joined: Thu Apr 20, 2006 8:02 am
Location: University of Ottawa

localobj array

Post by pfortier »

How can I create a local object array?
I thought of entering "localobj ref[4]" in a procedure but that didn't work.
Outside a procedure, I can successfully create an object array using "objref ref[4]".

Thanks,
Pierre

pfortier
Posts: 47
Joined: Thu Apr 20, 2006 8:02 am
Location: University of Ottawa

Re: localobj array

Post by pfortier »

Solved by making "localobj ref" and connecting to a List:
ref = new List()
for i=0,3 ref.append(new Vector())

ted
Site Admin
Posts: 5772
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: localobj array

Post by ted »

Good solution. Another possibility, assuming that all vectors are of the same size and you know how many you need to deal with, is to use the Matrix class's setcol() or setrow() method. Which one you choose depends on what you intend to do with all those numbers.

Post Reply