[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Arrays: strange feature ?!



Hi.

More I use IDL, more I found strange features. The one I want to talk
about is the way you create multidimensional arrays. Look the following
IDL commands sequence:

IDL> print, [[1, 2], [3, 4]] 
       1       2 
       3       4 
IDL> a = [1, 2] 
IDL> b = [3, 4] 
IDL> print, [a, b] 
       1       2       3       4 

Why the same notation has two meanings? Why for the first print the
[something, something_else] notation creates an array of arrays, and for
the second one the same notation concatenates the arrays? I can't find
the logic behind this.

In fact I stopped on this because I want to create an array of images
using something like that: [image1, image2, image3]. What is the way to
do this without creating a new temporary variable array? Or is there a
way to create easily a list of anything.

I want to build a procedure that takes a list of images and displays
them, something like that:

myDisplayProcedure, myImagesList, parameter1, parameter2

where myImagesList is something like that:
   {image1, image2, image3}
or anything else that can be create on the command line.

I hope I am clear enough.

Any comments? Any suggestions?

Nicolas.

--
Tél. : 00 (33) 5 62 88 11 16
Fax  : 00 (33) 5 62 88 11 12
Nicolas.Decoster@Noveltis.fr

Noveltis
Parc Technologique du Canal
2, avenue de l'Europe
31520 Ramonville Saint Agne - France