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

Username:   Password: 
 RegisterRegister   
 using the enter key in turing
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Fonzie




PostPosted: Sun Apr 09, 2006 3:14 pm   Post subject: using the enter key in turing

for a program I'm making I needed to have the arrow keys used as input. I made a previous program that used similar code so I just used that as a template. Here is what's in my current program

var chars : array char of boolean
loop
Input.KeyDown (chars)
if chars (KEY_RIGHT_ARROW) then
check := check + 1
exit
end if
if chars (KEY_LEFT_ARROW) then
check := check - 1
exit
end if
end loop

So I'm using this to have the user move between options, but I want them to be able to push enter to confirm the option. putting ENTER in place of KEY_RIGHT_ARROW didn't work. How can I have turing recognize the user pushed enter?
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Sun Apr 09, 2006 4:01 pm   Post subject: (No subject)

Use KEY_ENTER. A complete collection of these constants can be found in the Turing Reference help file.
Fonzie




PostPosted: Sun Apr 09, 2006 9:14 pm   Post subject: (No subject)

thanks kindly
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: