[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keyword precedence

"Mark Hadfield" <m.hadfield@niwa.cri.nz> wrote in message
> With the third one, 12 is printed in every case! My interpretation: IDL's
> handling of keyword abbreviations is such that an abbreviated keyword
> precedence over a non-abbreviated one, and this overrides the "fully
> by-reference first" rule.

This isn't quite true either. Further experimentation, left as an exercise
for the reader, establishes that the "fully
by-reference first" rule only applies when the conflicting keywords have
identical names. If the user-supplied keyword name to MGH_EXAMPLE_KEYWORDS
is shorter *or* longer than the default it's supposed to override, then the
user-supplied value wins every time.

I guess the point is that the reference inheritance mechanism only has to
choose between conflicting keywords when they are represented by
(case-insensitively) identical strings. Otherwise it just passes them both
through to the next level, where they are dealt with properly.

Mark Hadfield
m.hadfield@niwa.cri.nz  http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand