1 matches bool, 2 matches long

"Luís "Luís
Fri Apr 26 22:54:44 PDT 2013


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?
int x = 42;
if(x) { ... }                   // ok (doesn't this imply c = 
getInt() ok too?
if(42) { ... }                 // ok


More information about the Digitalmars-d mailing list