On Tue, Apr 7, 2009 at 7:54 AM, Erik Hofman wrote:
>
>
> Tim Moore wrote:
> > Erik Hofman wrote:
> >> There is still something that isn't addressed with his proposal.
> >> At this time all types can be converted to all other types. It would be
> >> easy to convert any float/doubles or integers to a one element array,
> >> but how would a multi-element array be converted to a float or integer?
> >> My best guess is returning a NaN which is not very elegant (and which
> >> doesn't work for integers).
> >> Another way is to just ignore the node if a non-compatible type is
> >> requested.
>
> > My proposal, and code, returns a "default value" in this case. The
> default value
> > is 0 for scalar types, the empty string, or a vector of zeros for vector
> types.
>
> Which is basically saying: this node doesn't exist.
> Now the next problem, what if the requester asks to create a new node if
> one doesn't exists?
Isn't this analogous to what happens in the existing system when you ask for
the numeric value of a string that is composed entirely of characters? The
result is "ill" defined so we just return 0.
Regards,
Curt.
--
Curtis Olson: http://baron.flightgear.org/~curt/
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel