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

Home » Public Forums » archive » Re: Keyword abbreviation ambiguities
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: Keyword abbreviation ambiguities [message #38924 is a reply to message #38921] Mon, 05 April 2004 04:47 Go to previous messageGo to previous message
mwvogel is currently offline  mwvogel
Messages: 9
Registered: February 2003
Junior Member
Dear All/Craig,

>> One way to overcome this would be to use the _EXTRA keyword. One of many
>> options would be
>>
>> function testfunc, _EXTRA=e
> ...
>
> Greetings, it's true that one can use the _EXTRA keyword explicitly,
> i.e. by directly passing a structure through _EXTRA. However, the
> _EXTRA keyword processing still doesn't allow us to do the desired
> thing, which is:
>
> testfunc, title='a', title1='b'

Using the code below I get the following on my system
IDL> print, !VERSION
{ x86 Win32 Windows 5.4 Sep 25 2000 32 64}
IDL> help, testfunc( title='a', title1='b')
ab
<Expression> INT = 0

I feel this code should work cross platform, but have not tested it. Of
course Craig Markwardt and M. Katz were right pointing out that the explicit
definition as originally requested will not work.

code :
function testfunc, _EXTRA=e
;title=t,
;title1=t1
FOR i=0,N_TAGS(e)-1 DO $
CASE (TAG_NAMES(e))[i] OF
'TITLE' : t = e.title
'TITLE1': t1 = e.title1
ENDCASE
print, t, t1
return, 0
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Print, 34000/340000 results 0? what ́s wrong?
Next Topic: Re: Print, 34000/340000 results 0? what ́s wrong?

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

Current Time: Sat Nov 29 17:07:22 PST 2025

Total time taken to generate the page: 0.56277 seconds