TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: FRED COLE
from: ERIK WARMELINK
date: 1997-04-19 16:50:00
subject: Scroll Lock

Fred Cole wrote in a message to Cliff Rhodes:
 CR>> class KeyState {
 CR>>   private:
 CR>>      const char far *ks;   // Pointer to BIOS keyboard flag
 CR>> []
 CR>> }
 EW> Shouldn't that be
 EW>    const volatile char far *ks;
 EW> since the flag can be changed by external causes (like the user)?
 FC> Shouldn't that be
 FC>      volatile char far * const ks;
I don't know enough about the BIOS keyboard flag to comment on stripping the 
const modifier (is that the right word?) off of char. If a program is allowed 
to change the keyboard flags, ``const'' would be redundant, perhaps even too 
restictive.
Adding a const modifier to the pointer is a good idea. However, it is not 
strictly necessary, since ks is a private member.
Perhaps making the pointer static would a be good idea too, since there's 
only one BIOS keyboard flags byte.
Bye,
 Erik 
---
---------------
* Origin: WarmelinkE@vertis.nl (2:282/608.60)

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™.