Is there an exit Command to just close the program?
Author |
Message |
tristanbryce7
|
Posted: Wed Jan 23, 2013 5:38 pm Post subject: Is there an exit Command to just close the program? |
|
|
Hey, i was just wondering if there was a line in command in turing that just closes the program, nothing else, I know that if you're doing linear programming you can use "exit" (considering your last bit of code is in a loop), and also know that "return" command can sometimes work (I say sometimes b/c sometimes if I go from proc to proc to proc to .... it doesn't work) and I know that the "quit" command closes the program w/o fail, but it also goes back to the turing code and highlights the bit of code containing "quit" and looks "unclean". So i was wondering basically what line of code can just stop the program (like quit does but w/o the after effects) |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Wed Jan 23, 2013 6:22 pm Post subject: RE:Is there an exit Command to just close the program? |
|
|
quit throws an exception, which (if not caught) pops off the entire stack, getting you to the end of the program really fast. Since the exception wasn't caught, the reasonable thing is to show where it originated, for the debugging purposes...
I'm not sure what the answer is, but I wonder how this behaves from a compiled/stand-alone program. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
tristanbryce7
|
Posted: Wed Jan 23, 2013 6:33 pm Post subject: Re: Is there an exit Command to just close the program? |
|
|
Ah i see, I guess the only thing I can do is stay with quit lol |
|
|
|
|
|
chrisbrown
|
|
|
|
|
Tony
|
Posted: Wed Jan 23, 2013 8:58 pm Post subject: RE:Is there an exit Command to just close the program? |
|
|
ah, thx!
Guess you'd have to place a handler at the bottom of the stack to catch quit and exit gracefully. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
tristanbryce7
|
Posted: Thu Jan 24, 2013 7:46 am Post subject: Re: Is there an exit Command to just close the program? |
|
|
There's never a simple solution, sigh. And you'd think Turing has an option which just closes the problem lol |
|
|
|
|
|
|
|