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

Home » Public Forums » archive » Re: Newbie Questions
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: Newbie Questions [message #25037 is a reply to message #25036] Tue, 15 May 2001 11:51 Go to previous messageGo to previous message
Ben Tupper is currently offline  Ben Tupper
Messages: 186
Registered: August 1999
Senior Member
Geoff Herbynchuk wrote:

> On Tue, 15 May 2001, Geoff Herbynchuk wrote:
>
>> Was just wondering if IDL can have pointers to structures. I'm trying to
>> access a variable in the structure with:
>>
>> if (*info).active_cursor EQ 1) then .....
>>
>> And I keep getting an error which says "Expression must be a structure in
>> this context: <PtrHeapVar57>."
>>
>

Hello,

If the active_cursor tag represents the pointer within the structure, then you
will want to dereference it as follows:

if *(info.active_cursor) EQ 1 then .....

As JD has pointed out to the us pointer-challenged, you can also go the lazy
route:

if *info.active_cursor EQ 1 then .....

The way you have written (*info).active_cursor indicates that info is a pointer
to a structre that conatins the active_cursor rather than being a structure
containing a field defined as pointer.

Ben


--
Ben Tupper
248 Lower Round Pond Road
POB 106
Bristol, ME 04539

Tel: (207) 563-1048
Email: PemaquidRiver@tidewater.net
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL sockets
Next Topic: Re: WTD: Orbital analysis with IDL

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

Current Time: Fri Oct 10 10:09:35 PDT 2025

Total time taken to generate the page: 1.11815 seconds