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 #25036] Tue, 15 May 2001 12:21 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Geoff Herbynchuk <gherbyn@irus.rri.on.ca> writes:

> Hi,
>
> 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>."
>
> Does anyone know what I'm doing wrong?

Umm, are you sure that INFO points to a structure? I tried it and it
worked fine. (see below). Why not put a "HELP, *INFO, /STRUCT" right
before this statement and see what pops up?

IDL> struct = {active_cursor: 1}
IDL> info = ptr_new(struct)
IDL> help, (*info).active_cursor
<Expression> INT = 1
IDL> help, info
INFO POINTER = <PtrHeapVar1>

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[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: Wed Oct 08 19:13:55 PDT 2025

Total time taken to generate the page: 0.00396 seconds