Pointer to string allows assigning int[]?
cal
callumenator at gmail.com
Mon Nov 12 13:11:14 PST 2012
On Monday, 12 November 2012 at 21:08:43 UTC, simendsjo wrote:
> It's not a bug.
>
> string is an alias for immutable(char)[].
> ubyte can be implicitly converted to char.
> All your numbers are less than 256, so dmd is able to convert
> them to char.
> If you try this, it fails.
> string s = [256]; // 256 is > char.max
Ah right of course, thank you.
More information about the Digitalmars-d-learn
mailing list