Boolean values: Difference between revisions

Content added Content deleted
(shorten Pascal, by _grouping_ definitions into the norms that originally introduced certain types)
Line 1,505: Line 1,505:
Pascal defines the type <code>Boolean</code> as a “special” enumeration type with exactly two elements:
Pascal defines the type <code>Boolean</code> as a “special” enumeration type with exactly two elements:
<code>false</code> and <code>true</code>.
<code>false</code> and <code>true</code>.
It is guaranteed that <code>ord(false)</code> is&nbsp;<code>0</code> and <code>ord(false)</code> is&nbsp;<code>1</code>.
It is guaranteed that <code>ord(false)</code> is&nbsp;<code>0</code> and <code>ord(true)</code> is&nbsp;<code>1</code>.


There is no automatic conversion from integer values to Boolean values, as it is prevalent in many other languages.
There is no automatic conversion from integer values to Boolean values, as it is prevalent in many other languages.