On (15 Apr 97) Fred Cole wrote to Cliff Rhodes...
FC> Cliff Rhodes of 1:106/2000@fidonet.org said to Erik Warmelink:
--> Erik Warmelink wrote to Cliff Rhodes <--
EW> CR> class KeyState {
EW> CR> private:
EW> CR> const char far *ks; // Pointer to BIOS keyboard flag
EW>
EW>Shouldn't that be
EW> const volatile char far *ks;
EW>since the flag can be changed by external causes (like the user)?
CR> I think you've got a good point!
FC> Shouldn't that be
FC> volatile char far * const ks;
FC> [ const far pointer to volatile char ]
You're both about 90% right. What's really needed is:
volatile const char far *const ks;
Which prevents you from accidentally writing to the BIOS Data Area, or
from changing the pointer to point at something else.
Later,
Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)
|