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 #53031 is a reply to message #52872] Tue, 13 March 2007 03:24 Go to previous messageGo to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
JD Smith wrote:
> On Fri, 09 Mar 2007 10:25:41 +0100, Paolo Grigis wrote:
>
>> Here's a simple example of a routine that returns different values if it
>> is called by value or by reference.
>>
>> pro pg,a,b
>>
>> b=arg_present(a)
>>
>> end
>>
>>
>> IDL> x=1
>> IDL> pg,x,b
>> IDL> print,b
>> 1
>>
>> IDL> pg,x+0,b
>> IDL> print,b
>> 0
>>
>> IDL> pg,x[0],b
>> IDL> print,b
>> 0
>
> That's a bit of a contrived example, given that the whole reason I
> originally lobbied for ARG_PRESENT was so you could differentiate between
> by-value and by-reference arguments (which I observed IDL's own internal
> routines could do, so clearly it was functionality waiting to be exposed).
>
> JD
>

Sure, but it may nevertheless come handy for the next
submission to the obfuscated IDL code contest ;-)

Ciao,
Paolo
[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 Nov 29 21:17:48 PST 2025

Total time taken to generate the page: 2.80111 seconds