1 matches bool, 2 matches long
deadalnix
deadalnix at gmail.com
Sat Apr 27 03:23:17 PDT 2013
On Saturday, 27 April 2013 at 05:54:48 UTC, Luís Marques wrote:
> Is this what some of you are asking for?
>
> bool a = true; // ok
> bool b = false; // ok
> bool c = 1; // error, no implicit conversion
> bool c = getInt(); // error? ok?
Last 2 are error.
> int x = 42;
> if(x) { ... } // ok (doesn't this imply c =
> getInt() ok too?
> if(42) { ... } // ok
if insert a cast already, so all are ok.
More information about the Digitalmars-d
mailing list