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

Username:   Password: 
 RegisterRegister   
 Ending getch
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Legionoflight




PostPosted: Tue May 31, 2005 8:28 am   Post subject: Ending getch

Say i have 3 screens,

var user_key : string (1)
locate (25, 25)
put "Press any key to continue..." ..
getch (user_key)

I use the command above to switch screens, How do i make the getch end by the end of the thrid screen so that if i press any key on a different screen, it won't go back to the 3 screens?
Sponsor
Sponsor
Sponsor
sponsor
StarGateSG-1




PostPosted: Tue May 31, 2005 9:25 am   Post subject: (No subject)

If you wnat to switch screens you need to look into Input.KeyDown and make sure each screen is a seperate file or procedure, then when you check if a key is pressed you called other screen. Or if all your screens are open you can Set.ActiveWindow look it up.
Legionoflight




PostPosted: Tue May 31, 2005 11:36 am   Post subject: (No subject)

ok thanks...i got that out of the way and another problem just surfaced..

How do a carry a variable from one procedure into antoehr?
atrain




PostPosted: Wed Jun 01, 2005 12:46 am   Post subject: (No subject)

you have to declair it externaly...

var text : string

procedure a
text := "hello world"
end a

procedure b
if text := "hello world"
then
text :="hi there!"
else
text := "nope"
end if
end b
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  [ 4 Posts ]
Jump to:   


Style:  
Search: