[Issue 1624] test of bool doesn't hold always
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Oct 29 05:07:07 PDT 2007
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=1624
matti.niemenmaa+dbugzilla at iki.fi changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID
------- Comment #3 from matti.niemenmaa+dbugzilla at iki.fi  2007-10-29 07:07 -------
http://www.digitalmars.com/d/1.0/type.html
"A bool value can be implicitly converted to any integral type, with false
becoming 0 and true becoming 1. The numeric literals 0 and 1 can be implicitly
converted to the bool values false and true, respectively."
If you shove a value which is neither 0 nor 1 into a variable, and expect it to
behave as though it were 0 or 1, you are doing something wrong.
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list