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

Home » Public Forums » archive » Yet again, The Sky is Falling!
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: Yet again, The Sky is Falling! [message #52974 is a reply to message #52872] Fri, 09 March 2007 09:18 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On Mar 9, 9:38 am, "yp" <Yaswant.Prad...@gmail.com> wrote:
> Your guess is right. I caught the culprit - I had presumed the first
> value of thetaV to be zero (which is not) and when I pass the
> parameter by reference it picks the nearest value of the thetaV tab
> (1.078) and it does exactly what you suspected .

Ah, so the real problem was not passing by reference, but passing the
same variable by reference to the routine multiple times and changing
one of them (causing the others to also change).

I guess it makes sense, but somehow this was suprising to me. When I
examined phi before and after the offending line:

print, phi
if (senzp LT senztab[0]) then senzp = senztab[0]
print, phi

the value of phi had changed.

Moral of the story: don't change the value of input parameters.

Mike
--
www.michaelgalloy.com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: mpeg creation problem
Next Topic: reading many files

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

Current Time: Sat Oct 11 12:23:44 PDT 2025

Total time taken to generate the page: 0.88082 seconds