PC> But if you have a function that has to return a flag value to notify
PC> of success or failure you have to use something, perhaps
PC> enum {SUCCESS, FAILURE};
PC> would be better?.
Definitely not. 0 and 1 are best. 0 and non-zero are well-defined,
you can read ANY book on C, and find out that 0 is false and non-zero
is true. When you start redefining the language by putting in crap
like #define SUCCESS 1, you have to chain back through header files
looking for where it is defined, because you're now using "Joe Blogg's
C" instead of standard C. If it was so good, they would have included
it as part of the standard. Just like that TCXL dickhead defining
IntT as short or something. It's just crap. If you want to write
your own language, go right ahead. C is already written.
BTW, ISO did define EXIT_SUCCESS and EXIT_FAILURE. They serve a
different purpose though. BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|