casting int[] to bool[]
Jarrett Billingsley
jarrett.billingsley at gmail.com
Wed Jan 28 19:04:41 PST 2009
On Wed, Jan 28, 2009 at 9:57 PM, Bill Baxter <wbaxter at gmail.com> wrote:
>
> It's just that casting is a very blunt tool and should be avoided
> whenever possible, because the compiler won't tell you if you're doing
> something completely crazy.
>
> Here you could use somethign like:
>
> dataIn[i][index] = (t!=0);
>
> instead of casting.
Blunt? Pfah! cast(bool)int is well-defined. ;)
More information about the Digitalmars-d-learn
mailing list