[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IDL interpreter questions - can someone (D.Fanning) explain - TIA




mankoff@I.HATE.SPAM.lasp.colorado.edu wrote in message ...

>Now its true that I don't know anything about the actual IDL
>implementation (though I have written RPC code for IDL). I actually
>answered based upon the behavior of IDL, not the implementation.  That is,
>functions won't modify the callers variables, and neither will procedures,
>unless you add the 'return'.

That's not true.  Here's the proof:
pro myproc, a
     a=2
end

function myfunc, a
     a=3
end

; Test program
a = 1
myproc, a
help, a
a = 0
t = myfunc(a)
help, a
end

.run test
A               INT       =        2
A               INT       =        3

So the procedure and the function both modified arguments passed to them.


Mark Rivers