TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: FRED COLE
from: JERRY COFFIN
date: 1997-04-16 23:24:00
subject: Scroll Lock

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.