Re: close program by code

2014-06-26 Thread FreeSlave via Digitalmars-d-learn
On Thursday, 26 June 2014 at 11:07:37 UTC, Rene Zwanenburg wrote: On Thursday, 26 June 2014 at 10:40:00 UTC, John Colvin wrote: On Thursday, 26 June 2014 at 09:58:50 UTC, FreeSlave wrote: On Thursday, 26 June 2014 at 09:05:23 UTC, pgtkda wrote: How can i close my application by code? Do you

Re: close program by code

2014-06-26 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Jun 26, 2014 at 01:23:17PM +, Chris Nicholson-Sauls via Digitalmars-d-learn wrote: > On Thursday, 26 June 2014 at 11:07:37 UTC, Rene Zwanenburg wrote: > > > >They won't. Same for module destructors. > > > >If you need those to work, another option is to throw some custom > >Exception t

Re: close program by code

2014-06-26 Thread Chris Nicholson-Sauls via Digitalmars-d-learn
On Thursday, 26 June 2014 at 11:07:37 UTC, Rene Zwanenburg wrote: They won't. Same for module destructors. If you need those to work, another option is to throw some custom Exception type which is only caught in main. I really wish this wasn't the answer, but for some programs I've had to r

Re: close program by code

2014-06-26 Thread Rene Zwanenburg via Digitalmars-d-learn
On Thursday, 26 June 2014 at 10:40:00 UTC, John Colvin wrote: On Thursday, 26 June 2014 at 09:58:50 UTC, FreeSlave wrote: On Thursday, 26 June 2014 at 09:05:23 UTC, pgtkda wrote: How can i close my application by code? Do you mean exit status? Just call exit function from C library. import

Re: close program by code

2014-06-26 Thread John Colvin via Digitalmars-d-learn
On Thursday, 26 June 2014 at 09:58:50 UTC, FreeSlave wrote: On Thursday, 26 June 2014 at 09:05:23 UTC, pgtkda wrote: How can i close my application by code? Do you mean exit status? Just call exit function from C library. import std.c.stdlib; void main() { exit(0); } Will destructors a

Re: close program by code

2014-06-26 Thread pgtkda via Digitalmars-d-learn
On Thursday, 26 June 2014 at 09:58:50 UTC, FreeSlave wrote: On Thursday, 26 June 2014 at 09:05:23 UTC, pgtkda wrote: How can i close my application by code? Do you mean exit status? Just call exit function from C library. import std.c.stdlib; void main() { exit(0); } wow, thank you ver

Re: close program by code

2014-06-26 Thread FreeSlave via Digitalmars-d-learn
On Thursday, 26 June 2014 at 09:05:23 UTC, pgtkda wrote: How can i close my application by code? Do you mean exit status? Just call exit function from C library. import std.c.stdlib; void main() { exit(0); }

close program by code

2014-06-26 Thread pgtkda via Digitalmars-d-learn
How can i close my application by code?