Re: Storing !NULL in struct [message #83629 is a reply to message #83531] |
Fri, 15 March 2013 11:51   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 3/15/13 2:10 AM, Tom Grydeland wrote:
> On Wednesday, March 13, 2013 2:46:17 PM UTC, Mike Galloy wrote:
>> But !null is undefined:
>
> Not so undefined that I cannot assign it to a variable, or return it
> from a function, or use it as a good 'missing value' indicator in
> most cases. It is also pretty damn useful if you want to build an
> array by parts (although, as Bob pointed out, I could use a LIST for
> that last case).
Nothing is so undefined that you can't return it from a function. !null
is special in that you can assign it to a variable, so assigning it to a
structure element would make some sense. It's just that I think the
typical use case for a structure is not to rebuild the whole thing when
you want to change a value (like you would if you switched the value
from undefined type to any other type).
Why not a HASH? It's made for more dynamic situations like this.
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
|
|
|