Enter & r keypress
Author |
Message |
Punde
|
Posted: Sat Feb 22, 2003 6:09 am Post subject: Enter & r keypress |
|
|
Hello,
I want to add to my program a line that says "Press r to rerun enter to continue" I have tried everything and got the r part but not the enter part. I want ONLY r to rerun and ONLY when the user presses Enter the program will continue. Any help with this??? Thx.
[EDIT]
I have another problem
I want to make this flag program that displays 5 flags coming from the top going downwards and stopping before they reach the end of the window. I want to do this using a module by making a procedure and calling them on the main program ( I know how to do this part). Can anyone help me with the flag going downwards part??? Thx again. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Sat Feb 22, 2003 10:14 am Post subject: (No subject) |
|
|
ASCII value for r is 114 and for "Enter" its 10.
code: |
var c:string(1)
getch(c)
put ord(c)
|
will tell you the ascii value of any key.
About flags going down, just redraw the picture a bit lower... so put that inside a forloop. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Punde
|
Posted: Sat Feb 22, 2003 12:43 pm Post subject: (No subject) |
|
|
I got the flags now, but I still don't know how to do the Enter and R keypress. Can anyone tell me how?? |
|
|
|
|
|
Tony
|
|
|
|
|
Dan
|
Posted: Sun Feb 23, 2003 2:37 pm Post subject: (No subject) |
|
|
if you still need more help look at this post:
http://danco.no-ip.com/turing/viewtopic.php?t=285
it is so close to being the same question it is funny, odd how that is, eh? |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
|
|