Walter Meester
HoogkarspelNetherlands
General information
Category:
Visual FoxPro Beta
I do accept the explanation that no NULLs are displayed in the conversions as this behaviour is consistent as with the use of the STR() function.
Sorry, but for me STR() or others conversion functions are irrelevants;
STR() input accept only numbers or currency and return only a string data type,
CAST allow various in/out data type;
TRANSFORM() is more similar, but the output it is only one string data type.
This is only a design choice: fire a error or return a unknown value ( NULL ) for unsupported casting.
For me, unknown ( NULL ) is a best choice.
I agree if we would be able to redesign Visual FoxPro from scratch I would think about your implementation, but given the current implementation I think the current behaviour is defendable.
yes, it is defensible much good in a strong data type ambient (like .NET),
but into a full variant typed, like VFP, this can generated tons of conversion errors
( a simple example:
you have a variant array, and you want cast it;
with NULL output for unsupported cast conversion you write a simple loop,
with errors for not supported cast conversion you have to trap all the unsupported original typed ).
However this is one my opinion.
Hi Walter.
Fabio
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only