R.G. Stockwell writes:
> If it is always 2 columns by whatever rows, then just concatenate the
> arrays.
> (you may have to do some tranposes)
>
> If there is a variable number of columns, then as David says, pointers.
Oh, here (for those you don't have time to read
the Dimensional Juggling and Pointer tutorials):
PRO Example
arrayptr = Ptr_New()
seed = -3L
FOR j=0,9 DO BEGIN
points = Randomu(seed, 2)
Print, 'Points: ', points
IF j EQ 0 THEN $
arrayptr = Ptr_New(points) ELSE $
*arrayptr = [[Tem****ary(*arrayptr)],[points]]
ENDFOR
Print, 'Print Values in Pointer'
Print, *arrayPtr
Ptr_Free, arrayPtr
END
Results in:
Points: 0.897916 0.558249
Points: 0.766930 0.589101
Points: 0.0603181 0.973112
Points: 0.0378892 0.218058
Points: 0.142394 0.984703
Points: 0.894904 0.947651
Points: 0.804079 0.160385
Points: 0.208246 0.818130
Points: 0.103716 0.741117
Points: 0.0134482 0.0960160
Print Values in Pointer
0.897916 0.558249
0.766930 0.589101
0.0603181 0.973112
0.0378892 0.218058
0.142394 0.984703
0.894904 0.947651
0.804079 0.160385
0.208246 0.818130
0.103716 0.741117
0.0134482 0.0960160
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Se****e ma de ni thui. ("Perhaps thou speakest truth.")


|