Mail Archives: djgpp/2000/04/16/04:19:27
On Sat, 15 Apr 2000, Alexei A. Frounze wrote:
> the only solution I see is something like this:
>
> ----------8<----------
> int keymap (int key) {
> return KeyMap[key];
> }
>
> int main() {
> do_something();
> if (keymap(sTab)) {
> do_something();
> while (keymap(sTab)) {};
> }
> do_something();
> }
> ----------8<----------
Nate suggested to declare KeyMap[] volatile. That's the Right Way of
solving these problems: variables that change their values behind
compiler's back should be declared as such, and then the compiler will
do what you want.
Did you try to use `volatile'? Did it work? If not, why not?
- Raw text -