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

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




PostPosted: Sat Jan 11, 2003 11:42 am   Post subject: getting around getch

hello. I am wondering if there is a way to get around the problems with the getch command. when directing a character on the screen, I want the program to detect if a key is being pressed. if not, then just keep executing the program as normal. I know something similar can be done with the Mouse.Where command, but I have yet to figure out a way to do this with the keyboard. please help.
Sponsor
Sponsor
Sponsor
sponsor
Brightguy




PostPosted: Sat Jan 11, 2003 12:47 pm   Post subject: Re: getting around getch

You mean something like:

code:
var key : string (1)

loop
    if hasch then
          getch (key)
          exit when key = "x"
    end if
end loop


Nothing fancy here. Just exits when user presses "x".
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  [ 2 Posts ]
Jump to:   


Style:  
Search: