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 
Return to the default flat view Create a new topic Submit Reply
Re: creating a special kind of array [message #9982] Wed, 01 October 1997 00:00 Go to previous message
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
[Message index]
 
Read Message
Read Message
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: Sun Oct 12 11:11:40 PDT 2025

Total time taken to generate the page: 1.52375 seconds