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 #63282 is a reply to message #63281] Tue, 04 November 2008 08:44 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
greg.addr@googlemail.com writes:

> 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.
>
> Any ideas why I can't assign something to this pointer?

Too much work to test this, but I think you have an
extra set of parentheses. I think it should be like
this:

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

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[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: Thu Oct 09 23:23:37 PDT 2025

Total time taken to generate the page: 0.55660 seconds