Re: ERROR: % Ambiguous keyword abbreviation: KEY [message #16141] |
Fri, 02 July 1999 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Martin Schultz (mgs@io.harvard.edu) writes:
> This topic might almost be worth a David Fanning article
> or at least a FAQ entry ;-)
Have I mentioned that I might *never* get any work done
if it weren't for Martin's prodding. :-)
Cheers,
David
P.S. I'll keep it in the back of my mind. :-)
P.S.S. The ambiguous keyword message is the dark side
of our ability to abbreviate keyword names. IDL creates
a list of keywords when the program is compiled. All
you have to do is specify enough keyword letters in
the call to find that keyword on the list. Think of
finding your new friend "bob" on the Christmas list. :-)
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: ERROR: % Ambiguous keyword abbreviation: KEY [message #16143 is a reply to message #16141] |
Fri, 02 July 1999 00:00  |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
gabriel rodriguez ibeas wrote:
>
> I have gotten a
>
> % Ambiguous keyword abbreviation: KEY
>
> error if I make define a procedure like:
>
> PRO ProcedureName, ..., KEYWORD=KEYWORD, ..., KEY=KEY, ....
>
> and then called it with:
>
> ProcedureName, KEYWORD=KEY.
>
> David Fanning has a program, COLORBAR which also produces the error if
> used, for example:
>
> COLORBAR, DIV=5, MAX=10,MIN=0, FORMAT='(F5.2)'
>
> I'm using IDL 5.2 for WIN32, in an NT machine.
>
> Has anyone had the same problem?. Is it a bug? (By default, I think
> IDL should check if there exists a keyword whose full name is the one we
> are using in the call, and search for abbreviatons afterwords.)
Well, that's just not the way IDL works! If you rename your KEY keyword
to KEY2 for example, then KEYWORD=KEY would be recognized correctly.
However, KEY=nnn would still be ambiguous.
This topic might almost be worth a David Fanning article or at least an
FAQ entry ;-)
Martin
--
|||||||||||||||\\\\\\\\\\\\\-------------------///////////// //|||||||||||||||
Martin Schultz, DEAS, Harvard University, 29 Oxford St., Pierce 109,
Cambridge, MA 02138 phone (617) 496 8318 fax (617) 495 4551
e-mail mgs@io.harvard.edu web http://www-as/people/staff/mgs/
********* ADDRESS CHANGE : AFTER JULY 15, 1999 ***************
Max-Planck-Institut fuer Meteorologie >>> N E W <<<
Bundesallee 55 >>> N E W <<<
20147 Hamburg >>> N E W <<<
Germany >>> N E W <<<
phone (+49 40) 41173 - 0 >>> N E W <<<
email martin.schultz@dkrz.de >>> N E W <<<
(email to mgs@io.harvard.edu will be forwarded)
************************************************************ *******
|
|
|