Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BOOL Datatype
Message
De
13/04/2000 04:36:18
 
 
À
13/04/2000 00:31:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00357504
Message ID:
00359149
Vues:
10
>I agree with you that boolean values should be treated as boolean and not as numbers, wherever and wenever possible.

My view is that boolean values should be treated as boolean and not as numbers, ALWAYS.

There are NO instances where booleans should be used as numbers, despite the fact that C/C++ allows it, there should always be an explicit conversion. It might lead to slightly smaller code, but usually its far less readable & maintainable.

(I've just recently had to tidy up somebody's very sloppy code, where the values of TRUE & FALSE were used numerically, there were functions that returned multiple values such as TRUE/FALSE/ERROR1/ERROR2 the values being used in a switch statement checking for 1,0,-1,-2 - hence my current strong views on correct use of booleans & not assuming values for TRUE/FALSE)
Mike

"I can live with doubt and uncertainty and not knowing. I think it is much more interesting to live not knowing than to have answers that might be wrong." - Richard Feynman
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform