[Issue 3927] array.length++; is an error, but ++array.length compiles
Salih Dincer
salihdb at hotmail.com
Wed Feb 22 06:38:34 PST 2012
No problem...
void main() {
int[] array = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ];
writeln(array, "~", ++array.length,
"->", --array.length);
assert (array.length == 10); // no problem
writeln(array, "~", array.length);
}
DMD version: 2.057
==================
salih at DB-N150-N210-N220:~/d.ders$ ./dene
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]~11->10
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]~10
Best regards..
More information about the Digitalmars-d-bugs
mailing list