Incrementing [].length

Luis Marques luismarques+spam at gmail.com
Wed Jun 21 06:26:06 PDT 2006


Hello

Consider this code:

int list[];
list.length += 1;

dmd issues the error "(list).length is not an lvalue".

Why doesn't "+=" work for the length property?
"list.length = list.length + 1" works.

Regards,
Luís





More information about the Digitalmars-d mailing list