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 #38921 is a reply to message #38920] Mon, 05 April 2004 06:10 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
mwvogel wrote:
> 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
>
>


This does only work if the keywords are completly written.
It would be bad to be forced to do it.

If you like to have different titles it is better to use different names
,e.g. legend_title, title, page_title.

You could group by a prefix like legend_ a whole bunch of keywords which
then could be extracted from the _extra structure easily and send to a
specific routine as e.g. title and so on.

I am using in this case extract_extra() from our library.

result=extract_extra(extra,'legend_*')


regards
Reimar


--
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
============================================================ =======
[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: Fri Nov 28 11:29:48 PST 2025

Total time taken to generate the page: 1.12306 seconds