digitalmars.D.learn - Does D supply basic error codes?
- NewName <b5458980 nwldx.com> Jan 29 2012
- mta`chrono <chrono mta-international.net> Jan 29 2012
- bearophile <bearophileHUGS lycos.com> Jan 29 2012
- "Jesse Phillips" <jessekphillips+D gmail.com> Jan 29 2012
- Jonathan M Davis <jmdavisProg gmx.com> Jan 29 2012
Hello all. C has EXIT_FAILURE and EXIT_SUCCESS to be returned from main(). Does D have similar predefined values?
Jan 29 2012
import core.stdc.stdlib;
int main()
{
return EXIT_FAILURE; // EXIT_SUCCESS works here too.
}
Am 30.01.2012 00:21, schrieb NewName:
Hello all.
C has EXIT_FAILURE and EXIT_SUCCESS to be returned from main().
Does D have similar predefined values?
Jan 29 2012
mta`chrono:import core.stdc.stdlib; int main() { return EXIT_FAILURE; // EXIT_SUCCESS works here too. }
And in D void main(){} returns a EXIT_SUCCESS. Bye, bearophile
Jan 29 2012
On Sunday, 29 January 2012 at 23:58:50 UTC, bearophile wrote:mta`chrono:import core.stdc.stdlib; int main() { return EXIT_FAILURE; // EXIT_SUCCESS works here too. }
And in D void main(){} returns a EXIT_SUCCESS. Bye, bearophile
Except when exited due to an exception thrown.
Jan 29 2012
On Sunday, January 29, 2012 23:21:16 NewName wrote:Hello all. C has EXIT_FAILURE and EXIT_SUCCESS to be returned from main(). Does D have similar predefined values?
No, but you can use the C ones if you want, as mta`chrono points out. - Jonathan M Davis
Jan 29 2012









bearophile <bearophileHUGS lycos.com> 