Versions des environnements
>>>What if the field is a year where -20,000,000 -> +20,000,000 are valid values (unless you are a creationist). What shall we you use then for 'unknown' . -1 and 999 will be a bit ambiguous....
>
>Ah.. you ask hard ones, Viv!
>Actually, it's even more complicated.
>There really are 3 conditions:
>1-Known and stated.
>2-Unknown - meaning the user has affirmatively said that this information is not known
>3- The user hasn't gotten around to populating this field yet (I call that unspecified, or in the neutral state) If there ever were a case for NULL, it might be here, but I still would find another way.
>
>Most of the time, 2 and 3 are functionally synonymous and we'll let them be so in this case to move things along.
>
>In COBOL we had handy things called HIGH VALUES and LOW VALUES that returned the highest and lowest numbers the current operating platform could produce.
>
>My first thought would probably be to use something similar in this case, but the real answer is that I'd have to know more about the application before I could answer.
There is NO value which is theoretically equivalent to null. Null means "We don't know." Repeating myself, I hate magic numbers.
This has been the most interesting developer thread here in quite a while IMO.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement