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

Username:   Password: 
 RegisterRegister   
 Hasch Key reading
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
vertdragon23




PostPosted: Wed Jan 08, 2014 11:11 pm   Post subject: Hasch Key reading

What is it you are trying to achieve?
I want to know how to read a specific key instead of all keys. I know it involves using the ascii code of the key.


What is the problem you are having?
I can't seem to remember, I used to know how to do this.


Describe what you have tried to solve this problem



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

Turing:


<var ch:string(1)

loop
if hasch

getch(c)

end if
end loop >



Please specify what version of Turing you are using
<4.1.1 (latest)>
Sponsor
Sponsor
Sponsor
sponsor
Raknarg




PostPosted: Wed Jan 08, 2014 11:41 pm   Post subject: RE:Hasch Key reading

you mean something like this?
Turing:

var ch : string(1)

loop
    if hasch then
        getch (ch)
        if ch = "c" then
            put "You pressed c"
        else
            put "You didn't press c"
        end if
    end if
end loop
vertdragon23




PostPosted: Thu Jan 09, 2014 11:08 pm   Post subject: RE:Hasch Key reading

Thanks Raknarg, I can't believe I forgot how to do something as simple as that.
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  [ 3 Posts ]
Jump to:   


Style:  
Search: