
9 Jan
2008
9 Jan
'08
11:01 p.m.
In message 014701c852ed$4b0c4040$6103170a@atmel.com you wrote:
Why not use symbolic return values?
Because then nobody knows what the symbols mean.
"return SUCCESS;" seems much more appropriate than "return 0;" or "return -1;"
These constants are unmistakeable for anyone who ever wrote a program under any Unix system...
if(myfunction() == SUCCESS) {
}
is much more clear than
if(myfunction()) {
}
Not to me. The former needs a lookup of the define, the latter is obvious.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Es gibt immer genug fuer die Beduerfnisse aller, aber niemals genug
fuer die Gier einzelner. -- Ghandi