View Single Post
Old 05-17-2004, 08:30 AM   #4 (permalink)
tritium
Professor of Drinkology
 
Agh... I had 4years of Pascal and now I can't remember the precise line of code you want...

I remember it had something to do with keypressed();

It was a library command that would detect when a key was pressed and return the value of true. So, you could develop a loop to play the 500Hz sound while keypressed(var)!=1 ... upon keypress, you would launch into a case statement (or whatever) to perform the requested action and then return to the sound loop. The delay should be short enough to be where your users would only hear a small click...

Aside from that, I remember in HS we would occassionally "forget" the nosound(); command and have gawd-awful sounds coming from our PCs until we recompiled and executed a program *with* nosound();

But, its been a while since I played with Pascal. You've gotten me nostalgic for Turbo Pascal... maybe I'll play with it later.

This guy has it in action: http://www.bowron.us/FILES/Languages/pascal
Just Ctrl-F for "keypressed"
__________________
Blah.

Last edited by tritium; 05-17-2004 at 08:33 AM..
tritium is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76