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

Home » Public Forums » archive » Re: Cool and Bizzare error in IDL 5.2.1
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: Cool and Bizzare error in IDL 5.2.1 [message #20390] Tue, 20 June 2000 00:00 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
Actually this turned out to be just the reult of calling a function
with a keyword being sent in my reference and the same thing
being passed as a parameter (doh). Ah, the perils
of recursion. It was pretty cool anyway though.

-bob




R.G. Stockwell <stockwell@co-ra.comremove> wrote in message
news:0dN35.38$482.32405@den-news1.rmi.net...
> Well, I've spent the last hour or so tracking down an error,
> and finally found the cuplrit. Check out the result of the following
> commands
>
> IDL> help,current_mean
> CURRENT_MEAN DOUBLE = -1.0853418
> IDL> help,newmean
> CURRENT_MEAN DOUBLE = -1.0853418
>
>
> I have two variables, current_mean and newmean. There are no pointers
> used, and the code is very straighforward (just iteratively calculating
the
> mean).
> Note how IDL>help,newmean give the result of current_mean, is that weird
or
> what??
>
> The error is that when newmean was calculated, current mean was being
> modified.
> The code fragment that demonstrates this is:
>
> print,'current mean: ',current_mean
> newmean = (current_mean*npoints+newpoint)/(npoints+1)
> print,'current mean: ',current_mean
>
> And the resulting output is:
> current mean: -1.0853418
> current mean: -0.13970473
>
>
> I'm not sure how I was able to do this, but if it's repeatable, I think I
> smell
> some obsfucated IDL code in my future!
>
> better get back to work, I just thought it was cool. If any one can
explain
> this,
> I'd be interested to hear it. But I'm guessing it will be difficult to
> reproduce.
>
> Cheers,
> bob
>
>
>
>
>
>
>
>
>
>
>
[Message index]
 
Read Message
Read Message
Previous Topic: Re: axis in scientific notation
Next Topic: Cool and Bizzare error in IDL 5.2.1

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

Current Time: Wed Oct 08 17:34:51 PDT 2025

Total time taken to generate the page: 0.00443 seconds