Mail Archives: djgpp/1998/08/15/02:45:33
Bjorn Hansen wrote:
> My programs that are successful often return a different exit code.
> When
> they fail I think they usually return 255. I don't put anything like
> return(0); at the end. should I do this?
Yes. main should always return type int.
> Is there anything else an
> exit
> code tells you besides if the program was successful. It seems like
> it must
> since it does not just return a 0 or a 1.
0 indicates a successful return. Nonzero indicates unsuccessful return.
Different nonzero values can be used to indicate different errors, but
they are all program dependent.
--
Erik Max Francis / email max AT alcyone DOT com / whois mf303 / icq 16063900
Alcyone Systems / irc maxxon (efnet) / finger max AT sade DOT alcyone DOT com
San Jose, CA / languages En, Eo / web http://www.alcyone.com/max/
USA / icbm 37 20 07 N 121 53 38 W / &tSftDotIotE
\
/ Freedom is a road seldom travelled by the multitudes
/ Public Enemy
- Raw text -