Boolean values: Difference between revisions
Content added Content deleted
(Added PicoLisp) |
No edit summary |
||
Line 181: | Line 181: | ||
Similar to [[Ada]], Modula-3 has a built-in <tt>BOOLEAN</tt> type defined as |
Similar to [[Ada]], Modula-3 has a built-in <tt>BOOLEAN</tt> type defined as |
||
<lang modula3>TYPE BOOLEAN = {FALSE, TRUE}</lang> |
<lang modula3>TYPE BOOLEAN = {FALSE, TRUE}</lang> |
||
=={{header|MUMPS}}== |
|||
<p>M[UMPS] has no data types per se, however, any value can be coerced to a specific |
|||
interpretation by applying certain operators.</p> |
|||
<p>Internally, the language treats any "zero" value as a "false", and any "non-zero" |
|||
value as a "true".<br/> |
|||
Values like 1, 2, 13245.08763, .1, "0.00001234ABC" and "1234ABC" are "true".<br/> |
|||
Values like 0, -3, "", " 123" (note the leading space in this one), |
|||
"+++++567", "abc", "abc1245" are "false".</p> |
|||
<p>When a boolean operator is applied to an operand, the value of that operand is |
|||
coerced to a logical value, that is: if the value starts out with a sequence of |
|||
digits that look like a non-zero number, the value is "true" (1), and otherwise |
|||
that value is "false" (0).</p> |
|||
=={{header|Objective-C}}== |
=={{header|Objective-C}}== |