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

Home » Public Forums » archive » compile a routine wich inlude a commun
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: compile a routine wich inlude a commun [message #47108 is a reply to message #47067] Tue, 24 January 2006 14:15 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Tue, 24 Jan 2006 22:30:22 +0100, F�LDY Lajos wrote:

> Hi,
>
> and the odd thing is, that functions sometimes return these references,
> not the values:
>
> function f, arg
> return, arg
> end
>
> a=1
> (f(a))=2
> help, a
>
> A INT = 2
>

Interesting. Try:

IDL> (f(a[0]))=2
% Expression must be named variable in this context: <INT ( 2)>.
% Execution halted at: $MAIN$

and you'll see the distinction. Temporary variables can be used for
many things, but direct assignment is not possible. One good use of
temporary variables is subscripting or structure dereferencing them:

IDL> a=(size(b,/DIMENSIONS)[0]


JD
[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: Picture of Prairie
Next Topic: MODE in IDL?

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

Current Time: Fri Oct 10 22:31:48 PDT 2025

Total time taken to generate the page: 0.47925 seconds