home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!rutgers!cmcl2!adm!news
- From: S105728@umrvma.umr.edu ( Steve Poulsen)
- Newsgroups: comp.lang.pascal
- Subject: Re readkey
- Message-ID: <31580@adm.brl.mil>
- Date: 29 Jul 92 18:38:21 GMT
- Sender: news@adm.brl.mil
- Lines: 22
-
- There is a problem with the readkey example. If you use readkey and check
- for a key, then you lose any further checks. Here's how I do it:
-
- Var
- ch1,ch2:char;
-
- Begin
- ch1:=ReadKey;
- Case ch1 of
- 32:{space}
- 46:{whatever}
- 0:Begin
- ch2:=ReadKey;
- Case ch Of
- 'K':{arrow}
- ...
- End;
- Else
- ...
- End;
-
- This always works good for me.
-