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

Username:   Password: 
 RegisterRegister   
 help on the getch command just need some info
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Leiak




PostPosted: Sun Jan 18, 2004 9:43 pm   Post subject: help on the getch command just need some info

when u use the getch command and lets say put getch(a) then a would be the variable to put if a = this then this happens correct? im just wondering cause it didnt work on my one part of my game not sure wut was wrong but i deleted the code for it i shud of posted it on here to see wut was wrong with it
Sponsor
Sponsor
Sponsor
sponsor
McKenzie




PostPosted: Sun Jan 18, 2004 9:49 pm   Post subject: (No subject)

The best way to handle commands you are not sure about is make a small test program. You say when you tried getch it didn't work (I will not try to debug code that no longer exists) well it was probably something else in your code. So to help you understand make a small program like:
code:
var ch:string(1)
getch(ch)
if ch = "x" then
    put "x hit"
else
    put ch," is not x"
end if

once you are sure the command works the way you think it does add it to your main program.
Leiak




PostPosted: Mon Jan 19, 2004 9:36 am   Post subject: (No subject)

ahhh thx ill try that...im in the process of trying to make a text based rpg at home so i need to figure out some commands to use to choose different storylines etc so far imnot very good at it Embarassed but for a first time program im doing good i guess
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: