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

Home » Public Forums » archive » Re: brain twister
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: brain twister [message #22800 is a reply to message #22797] Fri, 08 December 2000 13:10 Go to previous messageGo to previous message
mole6e23 is currently offline  mole6e23
Messages: 31
Registered: December 1998
Member
Paul van Delst <pvandelst@ncep.noaa.gov> wrote:

>> Okay, enough ideology for one week.
>
> That's *almost* a pun. :o)

Wow, I missed that one. Getting slow, I guess.

>> ----- Example 2
>> .comp
>> function test2, x
>> return, x
>> end
>>
>> a = dindgen(5)
>> (test2(a))[2] = -2
>> print, a
>
> You're right...this is weird. If you do a help:
>
> IDL> help, test2(a)
> A DOUBLE = Array[5]
>
> How come the result isn't
>
> <Expression> DOUBLE = Array[5]

I wouldn't expect the result to be <Expression> becaues the result _is_ A,
so I would expect IDL to tell me that the result is A. We pass in a by
reference, return it, and so we should expect to get it back. I'm happy
that IDL can keep track of the variable through all that mucking around...
it makes sense to me.

Todd
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: WNT environmental vars
Next Topic: IDLWAVE 4.6

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

Current Time: Fri Oct 10 00:50:40 PDT 2025

Total time taken to generate the page: 1.52589 seconds