Re: Yet again, The Sky is Falling! [message #52858 is a reply to message #52856] |
Thu, 08 March 2007 12:02   |
yp
Messages: 42 Registered: February 2005
|
Member |
|
|
On Mar 8, 7:27 pm, David Fanning <n...@dfanning.com> wrote:
> yp writes:
>> In my previous example, "Operation" = int_LUT and it does not change
>> any of the variables during execution or after. I don't suspect that
>> anything wrong happening inside "int_LUT". For any one case and for
>> same combination of the arguments:- if I run the code for several
>> times, I get same and consistent result each time. But when I switch
>> between passing the argument by value and by variable, I see the
>> discrepancy. Weird!
>
> Extremely weird!
>
> Just to humor me, could you please subscript your A, B, and F
> variables, so they are passed by value rather than by reference:
>
> IDL> Operation, a[0], b[0], c, d, e, f[0], result
>
> and tell us what happens both ways then? What if all parameters
> are passed by value?
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Hi David,
> IDL> Operation, a[0], b[0], c, d, e, f[0], result
This will not work as
b = n_elements(a)
So if I subscript A as a[0], I must set b[0]=1
Anyway, will give it a go with a[0], f[0] and b=1
|
|
|