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

Home » Public Forums » archive » Re: Pass-By-Reference question.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Pass-By-Reference question. (ARG_PRESENT) [message #38587 is a reply to message #38509] Fri, 12 March 2004 11:52 Go to previous messageGo to previous message
Andry William (Please is currently offline  Andry William (Please
Messages: 11
Registered: March 2004
Junior Member
> pro whaddup, nodata=nodata,_REF_EXTRA=_extra
>
> nodata_internal = 0
> if(arg_present(nodata)) then nodata_internal=nodata > 0 < 1
>

Hi All,

This might be off topic but can somebody explain to me why the
following statements give different result. (Maybe I did not really
understand the IDL manual). (I am using IDL 6.0).

I have the following procedure:

PRO t_arg_present,arg1=arg1

IF KEYWORD_SET(arg1) THEN PRINT, "'arg1' is set to ", arg1
IF ARG_PRESENT(arg1) THEN PRINT, "'arg1' is present", arg1

END

If I do:
IDL> t_arg_present,arg1=1
It returns:
'arg1' is set to 1

If I do:
IDL> t_arg_present,arg1=0
Nothing comes out.

If I do:
IDL> a=0
IDL> t_arg_present,arg1=a
It returns:
'arg1' is present 0

If I do:
IDL> a=1
IDL> t_arg_present,arg1=a
It returns:
'arg1' is set to 1
'arg1' is present 1

Are all the output the expected one?

Thanks,

Andry
[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
Previous Topic: IDL online help for v6.0 (sigh)
Next Topic: Re: Pass-By-Reference question. (ARG_PRESENT)

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

Current Time: Sun Oct 12 13:07:35 PDT 2025

Total time taken to generate the page: 1.11689 seconds