Re: Interesting WHERE function gotcha [message #34016 is a reply to message #33931] |
Mon, 10 February 2003 09:21  |
Stein Vidar Hagfors H[2]
Messages: 28 Registered: October 2002
|
Junior Member |
|
|
JD Smith <jdsmith@as.arizona.edu> writes:
> On Thu, 06 Feb 2003 19:35:31 -0700, Craig Markwardt wrote:
[...]
> Yes, the tension between single element arrays and scalars is felt
> deeply, even within the core IDL development group. It's a
> regrettable legacy which must, unfortunately, be preserved for
> compatibitlity. There are, however, minor changes and improvements:
> e.g., with v5.6, KEYWORD_SET now considers a single element array TRUE
> only if its single element is non-zero; i.e. it's treated just like a
> scalar for this (and only this) function.
Uh... improvement? I beg to differ. Not only does it introduce a
single mysterious case where the legacy compatibility fails (when
someone relies on the previous truth that "when it's defined as an
array, it's set!") (I hope I never have to debug a code experiencing
this!), but it introduces even one more level of exception to how
singular arrays are treated.... Okay, so trailing singular dimensions
are disappearing or are ignored, except when it's the last dimension
to survive the slaughter, *except* that this one nifty function that
we wrote specifically to say that anything not a scalar zero means
"set" is right now doing a vote on whether to consider your singular
dimension worthy of noticing... Ugh..!
--
------------------------------------------------------------ --------------
Stein Vidar Hagfors Haugan
ESA SOHO SOC/European Space Agency Science Operations Coordinator for SOHO
NASA Goddard Space Flight Center, Tel.: 1-301-286-9028
Mail Code 682.3, Bld. 26, Room G-1, Cell: 1-240-354-6066
Greenbelt, Maryland 20771, USA. Fax: 1-301-286-0264
------------------------------------------------------------ --------------
|
|
|