Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BOOL Datatype
Message
From
13/04/2000 04:36:18
 
 
To
13/04/2000 00:31:01
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00357504
Message ID:
00359149
Views:
9
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform