Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Quit with exe files
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Carey




PostPosted: Fri May 12, 2006 10:22 am   Post subject: Quit with exe files

does anybody know why the quit command doesn't work in exe files?
Sponsor
Sponsor
Sponsor
sponsor
do_pete




PostPosted: Fri May 12, 2006 11:30 am   Post subject: (No subject)

Don't use quits. Use exits and check the "Immediatly close run window(s)" box when compiling.
Carey




PostPosted: Fri May 12, 2006 12:29 pm   Post subject: (No subject)

it says that the "exit" command needs to be in a for or loop statement
ZeroPaladn




PostPosted: Fri May 12, 2006 12:34 pm   Post subject: (No subject)

exactly. if your code is in a loop (which it usually is) then there should be no problem. Just stuff the exit inside a loop where you want the program to exit the loop. for example...
code:
loop
put "hi!"
end loop


this is simple. keeps says hi untill you cant stand it anymore. and then some. Now with the exit statement...

code:
loop
put "hi"
exit
end loop


the exit statement, when used in a loop, exits the current loop, and begins on the code after the end loop. if there is no code, then the program ends. does this clear things up?
Clayton




PostPosted: Fri May 12, 2006 4:18 pm   Post subject: (No subject)

i think what he wants is for the program to close the run window when it ends, instead of the default

"Program Name-Finished"

and the window is still open, correct me if im wrong though Very Happy
[Gandalf]




PostPosted: Fri May 12, 2006 4:31 pm   Post subject: (No subject)

Yeah, the program will close if you exit the main loop (ie. no more statements to execute) and you select the "Immediatly close run window(s)" option when compiling.

An alternative you have, if you are not intending to compile your program, is to use Window.Open() with Window.Close(). I'll leave it up to you to figure out where to learn how to use those.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: