Posted by hussein on July 13, 1999 at 08:11:15:
In Reply to: Valid Input posted by Freddie Paras on July 13, 1999 at 02:25:16:
: What does the 256 ASCII values contain? More easily
: said, what button doesn't get entered into a buffer?
: If the shift, ctrl, F1-F12, Insert, Delete, Page Up,
: and all of those types of buttons are to be included
: into the buffer, how do we show this in code? What
: data type would these fall under?
thats a very good question ... im surprised nobody
else has asked it already ...
for a solution, we go back to the real world.
DOS handles this by using "0" as an escape
code to indicate the presence of special keys.
for a special key, there are two codes - "0"
and a code for the key ... these codes are called
the Extended ASCII codes ... for example, 0,72
corresponds to the "up-arrow" key.
using this technique DOS can represent up to
511 different keys in its buffer ... each
keystroke is actually a 2-char data item.
now the important part - do i want you to do this ?
if you really want to, it would be nice, but its not
part of the basic requirements for the project.
---
hussein