N
nick
such as exit(0),exit(1)
can i put any no. in the bracket?
what is their meanings?
thanks!
can i put any no. in the bracket?
what is their meanings?
thanks!
nick said:such as exit(0),exit(1)
can i put any no. in the bracket?
what is their meanings?
thanks!
such as exit(0),exit(1)
can i put any no. in the bracket?
what is their meanings?
This should answer most of your questions:
http://ccs.ucsd.edu/c/stdlib.html#exit.
A. Sinan Unur said:Hmmm ... that seems to be a copy of the Dimkumware library documentation.
I don't think they are allowed to put that on a publicly available web
server:
http://www.dinkumware.com/refxc.html
nick said:such as exit(0),exit(1)
can i put any no. in the bracket?
Yes.
what is their meanings?
Mabden said:Whatever you want. Zero means success. Anything else is considered an
error. You get to make up the error codes. It's YOUR program.
Yes.
Whatever you want. Zero means success. Anything else is considered an
error. You get to make up the error codes. It's YOUR program.
Whatever you want. Zero means success. Anything else is considered
an error. You get to make up the error codes. It's YOUR program.
Martin Ambuhl said:Please don't lie to the newbies. And if you don't know the answer, just
resist your irresistible urge to type bullshit.
Whatever you want. Zero means success. Anything else is considered an
error. You get to make up the error codes. It's YOUR program.
So, you'd think. But you are about to be surprised by the
thread-hijackers of this group...
He's simply incorrect though - codes other than 0, EXIT_SUCCESS and
EXIT_FAILURE aren't guaranteed to indicate failure - in particular,
an exit code of 256 will usually be read as success
indistinguishable from 0.
Kenny said:Calm down. Bad week to stop your meds.
Kenny said:(To no one in particular)
See what I mean?
(I think you guys need to look up the phrase "SEP" - I believe it is
a Douglas Adams thing)
(To no one in particular)
See what I mean?
(I think you guys need to look up the phrase "SEP" - I believe it is
a Douglas Adams thing)
(To no one in particular)
See what I mean?
(I think you guys need to look up the phrase "SEP" - I believe it is
a Douglas Adams thing)
That's incorrect. Either 0 or EXIT_SUCCESS means success.
EXIT_FAILURE means failure. Anything else is system-specific.
(To no one in particular)
See what I mean?
(I think you guys need to look up the phrase "SEP" - I believe it is
a Douglas Adams thing)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.