digitalmars.D.learn - Does D supply basic error codes?
- NewName (3/3) Jan 29 2012 Hello all.
- mta`chrono (6/9) Jan 29 2012 import core.stdc.stdlib;
- bearophile (4/10) Jan 29 2012 And in D void main(){} returns a EXIT_SUCCESS.
- Jesse Phillips (2/12) Jan 29 2012 Except when exited due to an exception thrown.
- Jonathan M Davis (3/6) Jan 29 2012 No, but you can use the C ones if you want, as mta`chrono points out.
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:Except when exited due to an exception thrown.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, 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