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

Home » Public Forums » archive » Re: taming the shrew, a.k.a. structure
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: taming the shrew, a.k.a. structure [message #26022 is a reply to message #26001] Wed, 01 August 2001 10:39 Go to previous messageGo to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
I can't really see why you are getting an error. I copy-pasted your code
onto the command line and it works just fine. I got rid of a few spaces
though :-)

month_struct = {month_struct, name: ptr_new(), day: $
ptr_new(), temp_c:ptr_new()}
station = {station, number:0L, month:{month_struct}}
po_basin = replicate(station, 10)
po_basin.month.name = ptr_new(strarr(2190))

Cheers,
Pavel

BTW, I'd suggest using /Allocate keyword when making those pointers.
This way you can simply say
*(po_basin.month.name)[i] = strarr(2190). Also, looks to me that all
elements of po_basin in your example will have the same strarr(2190) as
their Month.Name. Is this what you wanted? If you want different
contents, you will have to specify pointer contents individually for
every element of the array.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL and Beowolf ?
Next Topic: Re: polar contour plots

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

Current Time: Wed Oct 08 18:44:39 PDT 2025

Total time taken to generate the page: 0.00404 seconds