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

Username:   Password: 
 RegisterRegister   
 Is there a command that will let me do this?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Kman43759




PostPosted: Thu Oct 09, 2014 2:28 pm   Post subject: Is there a command that will let me do this?

What is it you are trying to achieve?
<
Id like to know if theres a way to have it so if the person doesnt enter something in during a get, something happens... for example in my game im making I want to have it so it comes up saying "duck!" and then there is a get and if you dont type something it comes up saying "you didnt duck in time so you died">


What is the problem you are having?



Describe what you have tried to solve this problem
<Nothing>


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>

Turing:


<Add your code here>



Please specify what version of Turing you are using
<4.1>
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Oct 09, 2014 3:23 pm   Post subject: RE:Is there a command that will let me do this?

"get" is a blocking command -- it "blocks"/waits for action to finish, before moving on to the next line of code. You want non-blocking input handling -- something that will not wait for the user. You can build something like that from hasch and getch.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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: