Change representation of dynamic arrays?
Janice Caron
caron800 at googlemail.com
Sat Oct 20 11:58:52 PDT 2007
On 10/20/07, Bill Baxter <dnewsgroup at billbaxter.com> wrote:
> Not quite true. if(str){} tests only the .ptr part and ignores the
> length
Ooh, that's nasty. I've never tried that.
Seems to me that either (a) if (array) shouldn't work - ie. arrays
shouldn't implicitly cast to bool, or else (b) if (array) should be
true iff the array is non-empty (which is not the same thing as
non-null).
I guess currently it tests whether or not the array is null - that is,
unassigned or explicitly assigned with null. I'm not sure why that's
useful.
More information about the Digitalmars-d
mailing list