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

Home » Public Forums » archive » Re: Extract a sub-structure from 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: Extract a sub-structure from a structure [message #47178 is a reply to message #47176] Thu, 26 January 2006 08:32 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
L. Testut writes:

> Even with the parantheses it doesn't work ?
> With solution 1 it becomes more tricky to change the type of each
> field parameter in the structure ? and what about the memory occupied
> by the old complete structure (which I don't need anymore)...or was it
> a joke ?

Have you *ever* known me to make a joke!? I'm
always deadly serious when it comes to IDL. :-)

(BTW, I've been told by my son that his girlfriend is
terrified of me, primarily because she can never tell
if I am joking or not. Must be an acquired taste.)

> this sequence works and I've read on this newsgroup that a
> de-referenced pointer is lik a variable
> so
>
> toto=ptr_new(findgen(100))
> print,*toto[where(*toto lt 50)]
> *toto=*toto[where(*toto lt 50)]
>
> why this last sequence doesn't work ? even with parantheses ?

Well, what parentheses? If I put parentheses in the right
place, it works for me:

toto=ptr_new(findgen(100))
print,(*toto)[where(*toto lt 50)]
*toto=(*toto)[where(*toto lt 50)]
help, *toto

<PtrHeapVar1> FLOAT = Array[50]

> PS: what is the local time in Fort Collins ?

I don't know. I've been up since 2AM with a dying dog. :-(

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Problem of precedence with pointer and structure
Next Topic: q5/ ***Hot stuff - check this out !!! q5/

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

Current Time: Fri Oct 10 06:01:57 PDT 2025

Total time taken to generate the page: 1.36349 seconds