November 11, 2003 BUG bool inout | ||||
---|---|---|---|---|
| ||||
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. |
Copyright © 1999-2021 by the D Language Foundation