Computer Science Canada Stopping "get" and continue program? |
Author: | DarkVee [ Fri Mar 25, 2005 7:05 pm ] | ||
Post subject: | Stopping "get" and continue program? | ||
Hi, I'm making a Q&A type of program with a timer, that if the timer goes to 0, you skip to the next question. But I'm having trouble in changing into the next question when the timer reaches 0. Can anyone help me or give me some advice in fixing it? Basically, How to I stop the get command at the bottom and go to another question? The program seems to still be stuck in get timer reaches 0.
Thanks in advance! |
Author: | mike200015 [ Fri Mar 25, 2005 10:14 pm ] |
Post subject: | |
1st thing.. remove the processes.. they are EVIL!! ![]() |
Author: | mike200015 [ Fri Mar 25, 2005 10:17 pm ] |
Post subject: | |
ok.. its becuz.. since u have processes.. and then the actual program part where sum1 enters their answer.. are not really apart of eachother.. so when the time = 0 in the time check process.. then it will put times up! but wont do nething else.. it wont stop u from entering.. so u need to try to put the whole program together in 1 procedure.. or mayb if u want do just the timer as a process.. that should help If u need more help jus ask or pm ![]() |
Author: | Cervantes [ Sat Mar 26, 2005 8:31 am ] |
Post subject: | |
This will be easier if you only need the user to input one key (ie. if you will use getch). Is this going to a multiple choice test or something? Or does the user have to enter the answer in full? |
Author: | DarkVee [ Sat Mar 26, 2005 10:33 am ] |
Post subject: | |
Quote: so u need to try to put the whole program together in 1 procedure.. or mayb if u want do just the timer as a process.. that should help
1 Procedure? but is there a command for stopping "get "? I'm sort of stuck there. Quote: This will be easier if you only need the user to input one key (ie. if you will use getch). Is this going to a multiple choice test or something? Or does the user have to enter the answer in full?
Yes, apparently I need the user to answer in full, instead of multiple choice. |
Author: | Cervantes [ Sat Mar 26, 2005 11:04 am ] | ||
Post subject: | |||
Okay, then, the only way I see of doing this is putting getch in a loop and adding whatever getch gets into a answer string. Then compare the answer string to the correct answer.
Works alright. Mind you, if you make a typo and try to backspace it out of there, you will get the answer wrong. It's easy to fix, but I'll let you do that. |