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

Home » Public Forums » archive » Re: Attempt to store into an expression: Structure reference
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: Attempt to store into an expression: Structure reference [message #63276 is a reply to message #63275] Tue, 04 November 2008 09:40 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
David Fanning schrieb:
> =?ISO-8859-2?Q?F=D6LDY_Lajos?= writes:
>
>> On Tue, 4 Nov 2008, greg.addr@googlemail.com wrote:
>>
>>> I'm doing something wrong here, but what - I'm not sure...
>>>
>>> IDL> help,s.tab
>>> <Expression> POINTER = <PtrHeapVar26>
>>>
>>> IDL> help,*(s.tab)
>>> <PtrHeapVar26> STRUCT = -> TAB Array[2]
>>>
>>> IDL> help,(*(s.tab))[0]
>>> <Expression> STRUCT = -> TAB Array[1]
>>>
>>> IDL> help,((*(s.tab))[0]).img
>>> <Expression> POINTER = <NullPointer>
>>>
>>> IDL> ((*(s.tab))[0]).img=ptr_new(image)
>>> % Attempt to store into an expression: Structure reference.
>>>
>> Seems to be an IDL bug. This works in FL:
>>
>> s={s, tab:ptr_new()}
>> tab={tab, img:ptr_new()}
>> s.tab=ptr_new(replicate(tab, 2))
>> ((*(s.tab))[0]).img=ptr_new(dist(100))
>
> This is what I had in mind:
>
> s={s, tab:ptr_new()}
> tab={tab, img:ptr_new()}
> s.tab=ptr_new(replicate(tab, 2))
> (*(s.tab))[0].img=ptr_new(dist(100))
>
> Cheers,
>
> David

I think it should be only

(*s.tab)[0].img=ptr_new(dist(100))


cheers
Reimar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Read_grib under IDL 7.0
Next Topic: array subtraction

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

Current Time: Fri Oct 10 04:00:22 PDT 2025

Total time taken to generate the page: 0.35866 seconds