October 03, 2002 basic array resizing | ||||
---|---|---|---|---|
| ||||
Call me a BASIC-loving fool but what's wrong with the syntax: float[] a; dim a[4]; for (i : a[i]) a[i] += 5; dim a[7]; // larger... so zero-fills (default initializes) the new ones for (i : a[i]) a[i] += 2; for (i : a[i]) print a[i] ' '; // prints 7777222 Sean |
Copyright © 1999-2021 by the D Language Foundation