casting int[] to bool[]

Daniel Keep daniel.keep.lists at gmail.com
Thu Jan 29 14:22:05 PST 2009



Saaa wrote:
> But then I get stuff like this:
> 
> value += pow( x, 2); //x=double
> --
> testcase.d(374): function std.math.pow called with argument types:
>  (double,int)
> matches both:
>  std.math.pow(real x, uint n)
> and:
>  std.math.pow(real x, int n)

That's because '2' as a literal is both an int and a uint.  Try this:

> value += pow( x, 2u );

  -- Daniel


More information about the Digitalmars-d-learn mailing list