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

Home » Public Forums » archive » Re: creating a special kind of array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: creating a special kind of array [message #9982] Wed, 01 October 1997 00:00
wonko is currently offline  wonko
Messages: 22
Registered: March 1997
Junior Member
slameczka@biomech.mat.ethz.ch (Michael Slameczka) wrote:

> i hope that the problem i have is very simple, but i found till now
> no solution, which satisfies me.
>
> I have a structure and i will build an array like this:
>
> array = [['name_1',struct_1],['name_2',struct_2],['name_3',struct_3] ]

Do you mean this?
array(0,0) eq 'name_1'
array(1,0) eq struct_1

> struct_x = {, name:string(10), data:intarr(4)}
> (where x is 1, 2, 3)

> is it in any way possible to build such an array in PV-Wave or not?

Not possible, the entries of an array all have to be of the same type.
What about something like this?:

a_struct = { name:'', struct:struct_x }
array = [ a_struct, a_struct, a_struct ]
or better: array = replicate( a_struct, 3 )
a_struct(0).name = 'name_1'
a_struct(0).struct = struct_1

Or this:

name_array = [ 'name_1', 'name_2', 'name_3' ]
struct_array = [ struct_1, struct_2, struct_3 ]

Alex
--
Alex Schuster Wonko@weird.cologne.de PGP Key available
alex@pet.mpin-koeln.mpg.de
Re: creating a special kind of array [message #9984 is a reply to message #9982] Wed, 01 October 1997 00:00 Go to previous message
R. Bauer is currently offline  R. Bauer
Messages: 137
Registered: November 1996
Senior Member
Michael Slameczka wrote:
>
> hello folks;
>
> i hope that the problem i have is very simple, but i found till now
> no solution, which satisfies me.
>
> I have a structure and i will build an array like this:
>
> array = [['name_1',struct_1],['name_2',struct_2],['name_3',struct_3] ]
>
> the structures are looking like this:
>
> struct_x = {, name:string(10), data:intarr(4)}
> (where x is 1, 2, 3)
>
> is it in any way possible to build such an array in PV-Wave or not?
>


on idl I do it whith new_struct=[struct_1,struct_2,struct_3]




> thanks in advance
> michael
> ____________________________________________________________ ______
> Michael Slameczka
> Biomechanics Laboratory, ETH Zurich
> Wagistrasse 4
> CH-8952 Schlieren
> Switzerland
> Phone: +41 1 633 63 58
> Fax: +41 1 633 11 24
> E-mail: slameczka@biomech.mat.ethz.ch

--
R.Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: idl and pv-wave
Next Topic: Re: tilde file names in FINDFILE

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

Current Time: Wed Oct 08 15:38:01 PDT 2025

Total time taken to generate the page: 0.00468 seconds