comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Array of structures.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Array of structures. [message #19984] Tue, 16 May 2000 00:00 Go to previous message
Nicolas Decoster is currently offline  Nicolas Decoster
Messages: 34
Registered: March 2000
Member
Hi.

I'd like to build an array of structure using one line. Something like
that:

arr = [{sig:a, color:'red'}, {sig:b, color:'green'}]

I don't want to use the replicate function and then fill the array one
by one:

arr = replicate({myStruct, sig:a, color:'red'}, 2)
arr[0] = {myStruct, sig:a, color:'red'}
arr[1] = {myStruct, sig:b, color:'green'}

Any suggestions ?

Thanks.

Nicolas.

ps: In fact, I'm trying to find a way to handle lists of anything. In
the present case I want to pass as one argument a list of signals
(arrays of value) associated with a color. The list must be of any size,
we must be able to build it on the fly. Something like that : {{sig1
'red'} {sig2 'green'}} in a Tcl-like syntax.

--
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Array of Structures
Next Topic: Can IDL look after graphics in C++ code?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 08:38:55 PDT 2025

Total time taken to generate the page: 1.44007 seconds