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

Home » Public Forums » archive » Is this a bug?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Is this a bug? [message #12978] Wed, 30 September 1998 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Platform: Sun Sparc2, Solaris 2.5 Patched
IDL Version: 5.0.3

Can someone please explain to me why the following is happening?

p = ptr_new( {a:1, b:2, s:{x:0,y:0, a:[256,256,48]} } )

print, ((*p).s.a)[2]
48

((*p).s.a)[2] = ((*p).s.a)[2] * 4
% Temporary variables are still checked out - cleaning up...

print, ((*p).s.a)[2]
48 ; Value was not adjusted

help, ((*p).s.a)[2]
<Expression> INT = 48

print, ((*p).s.a)
256 256 48

(*p).s.a[2] = (*p).s.a[2] * 4

print, ((*p).s.a)[2]
192 ; Value *was* adjusted

Is ((*p).s.a)[2] an invalid construct? IDL doesn't seem to have
problems with it in the PRINT command, and it sure seems ok to
me. The message about temporary variables seems to be a clue,
but I need some help on this one.

Thanks!

Dave
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How do you like this?
Next Topic: Copying IDL objects

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

Current Time: Sat Oct 11 13:16:13 PDT 2025

Total time taken to generate the page: 0.40278 seconds