We need to define the semantics of block initialization of arrays
Andrej Mitrovic
andrej.mitrovich at gmail.com
Mon Jun 3 05:10:07 PDT 2013
On 6/3/13, Don <turnyourkidsintocash at nospam.com> wrote:
> A lot of code relies on this behaviour, but the spec doesn't
> mention it!!!
I didn't know about it until Walter mentioned the syntax to me. I've
found it quite useful since then. E.g.:
char[100] buffer = 0;
Without this buffer is normally initialized with 0xFF, and this could
break C functions when you pass a pointer to such an array.
> Personally I'd like to just use block-init everywhere.
Me too. You get my vote.
More information about the Digitalmars-d
mailing list