Re: Keyword abbreviation ambiguities [message #38920] |
Mon, 05 April 2004 06:38  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
mwvogel wrote:
> One way to overcome this would be to use the _EXTRA keyword. One of many
> options would be
>
> 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
>
> Of course error checking should be performed. And full keywords should be
> used. For keyword completion, I think I once saw a post by Reimar Bauer on
> that topic.
This was a long thread
http://groups.google.de/groups?q=_extra+Reimar+group:comp.la ng.idl-pvwave&hl=de&lr=&ie=UTF-8&group=comp. lang.idl-pvwave&selm=3B56828A.71B9D015%40fz-juelich.de&a mp;rnum=3
It is a way to get out of this rules but it is not quite easy to explain
someone how to call a routine which is written this way.
routine_info gives no result about keywords. auto writing of header
pages are impossible.
Until now we have a lot of routines where keyword inhiterance is used.
And it is quite easy to find the routine where the keywords are
explained and the others could use _extra, _strict_extra or _ref_extra.
Reimar
>
> "Oliver Thilmann" <justspam03@yahoo.de> schreef in bericht
> news:c992bd37.0404040539.3446cff@posting.google.com...
>
>> Hi,
>>
>> the following piece of code:
>>
>>
>>> pro test
>>> y = testfunc( title=10, title1=20 )
>>> end
>>>
>>> function testfunc, title=t, title1=t1
>>> print, t, t1
>>> return, 0
>>> end
>>
>> results in the error message (IDL6.0):
>> % Ambiguous keyword abbreviation: TITLE.
>>
>> I don't see any ambiguity here. May I consider this a
>> (design-)bug, or is there some deeper meaning to this behaviour?
>> Regards
>> Oliver
>
>
>
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
|
|
|