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

Re: brain twister



Craig Markwardt wrote:
> 
> Okay, enough ideology for one week.

That's *almost* a pun. :o)

> 
> ----- 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]

???


-- 
Paul van Delst           Ph:  (301) 763-8000 x7274
CIMSS @ NOAA/NCEP        Fax: (301) 763-8545
Rm.207, 5200 Auth Rd.    Email: pvandelst@ncep.noaa.gov
Camp Springs MD 20746