[fpc-pascal]Error Trapping w/ ReadKey

Marco van de Voort marcov at stack.nl
Tue Oct 14 17:10:24 CEST 2003


[ Charset ISO-8859-1 unsupported, converting... ]
> Just getting into the "planning" phase of a personal project I'm working on,
> and one of the things I'm trying to do is predict where there's going to
> need to be some error trapping things in place.  As a part of this I've been
> browsing various message boards taking a look at what various people have to
> say about the topic.
> 
> One of the things that's come up for checking user input is to monitor what
> they input via keystroke one char at a time using ReadKey.  If I'm
> understanding this correctly, you can then use the case structure to tell
> the program what to do when specific keys are pressed.
> 
> Just wondering if I'm headed in the right direction with this, or if anyone
> has any code examples of ReadKey / case being used to trap per-keystroke
> user input

Yes, see the "gameunit" unit of the demo games. 




More information about the fpc-pascal mailing list