Thread View: net.lang.pascal
2 messages
2 total messages
Started by Karl M. Owen
Sun, 11 Aug 1985 17:57
Re: Turbo Pascal question
Author: Karl M. Owen
Date: Sun, 11 Aug 1985 17:57
Date: Sun, 11 Aug 1985 17:57
13 lines
830 bytes
830 bytes
Is there a way in Turbo V3 to find out what the key was pressed if the 'keypressed' function returns true? I want to take different actions depending on what the key is, but I don't know how to do a single character read. Thanks, Karl Karl M. Owen Data General, RTP, NC ...!seismo!mcnc!rti-sel!rtp47!owen
Re: Turbo Pascal question
Author: James P. Ericksen
Date: Mon, 12 Aug 1985 21:14
Date: Mon, 12 Aug 1985 21:14
25 lines
1432 bytes
1432 bytes
> Is there a way in Turbo V3 to find out what the key was pressed if > the 'keypressed' function returns true? > > I want to take different actions depending on what the key is, but I don't > know how to do a single character read. > I assume your problem is that you are using Read (input, c); (* c is a character variable *) which waits for a carriage return before proceeding (input is buffered). For unbuffered keyboard input, use Read (kbd, c); By the way, the best way around Turbo's brain damaged check-for-break-key (which can cause the character detected by the Keypressed function to dis- appear) is to disable checking for break key by putting (*$C-*) at the start of your program (necessary for sane operation of any program which reads the keyboard). Jim Ericksen Dept of Comp Sci UNC Chapel Hill
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads