
-----------------------------------
Strawberry
Thu Dec 31, 2009 9:36 pm

Getch (key) :d
-----------------------------------
Using getch (key)
how do you make the previous procedure automatically display the next procedure?



Sorry, I am new to turing. :)

-----------------------------------
DtY
Thu Dec 31, 2009 10:29 pm

RE:Getch (key) :d
-----------------------------------
That question doesn't make sense, can you give an example of what this would do?

-----------------------------------
StuartG
Mon Jan 04, 2010 7:34 pm

RE:Getch (key) :d
-----------------------------------
The only way i could think of this being used is that at the end of your procedure you basically freeze the program until any key is pressed then it runs the next...

such as:

var KEY : string (1)

proc TEST2
    put "Success"
end TEST2

proc TEST
    put "Press any key to run next proc:"
    getch (KEY)
    TEST2
end TEST

TEST

-----------------------------------
Strawberry
Wed Jan 06, 2010 7:40 pm

RE:Getch (key) :d
-----------------------------------
THANKS :)

-----------------------------------
Turing_Gamer
Wed Jan 06, 2010 7:46 pm

Re: Getch (key) :d
-----------------------------------
You can do this...

var reply : string % Making sure that the reply is a string will give the program more variety
                    % Certain functions may require to make the string a specific length -> 'string (#)'
put "Enter 'a' to do function 1 and 'b' to do function 2"
get reply
Then you can follow up with 'if' statements to check if they match your reply

Another possibility is using a hasch and getch command like the following...

if hasch then
    getch (command)
    %Write if statements saying if command matches specific char
end if

I'm not sure if they will apply to procedures
