D - BUG bool inout
- davepermen (10/10) Nov 11 2003 those:
those:
bool keys[SDLK_LAST];
for(uint index = 0;index < keys.length; ++index) {
keys[index] = keyStates[index] == 0 ? false : true;
}
foreach(uint index, inout bool key; keys) {
key = keyStates[index] == 0 ? false : true;
}
should be equivalent..
they aren't. foreach doesn't write to key.
Nov 11 2003








davepermen <davepermen_member pathlink.com>