TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Peter Collis
from: Paul Edwards
date: 1996-04-25 07:16:54
subject: Filename Expansion

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)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.