Computer Science Canada Hello. need to end program |
Author: | darkshade [ Thu Sep 13, 2007 11:21 am ] | ||
Post subject: | Hello. need to end program | ||
hello. in my program i need to know how to get it to finish in a if statment. here is my code so far. i have commeted on the area i need it to end in. please help.
|
Author: | CodeMonkey2000 [ Thu Sep 13, 2007 11:51 am ] |
Post subject: | RE:Hello. need to end program |
Try adding quit. |
Author: | darkshade [ Thu Sep 13, 2007 12:02 pm ] |
Post subject: | Re: Hello. need to end program |
Thank you sooooo much. i have tryed everything else! finish, break,end, exit! thank you! it works now! |
Author: | Carey [ Mon Sep 24, 2007 12:19 pm ] |
Post subject: | Re: Hello. need to end program |
You can also use return. return is better because when you compile it into an *.exe with the option "Immediately close run window" it only exits and doesn't say "Error: Quit#1" and die. however when return is used in a procedure, function, etc, it only exits that proc. In order for it to finish a program it has to be on the main level (not in a proc or other). |