Boolean values: Difference between revisions
m
→{{header|FutureBasic}}
No edit summary |
|||
Line 1,113:
=={{header|FutureBasic}}==
FB recognizes two types for boolean truth values: BOOL and boolean. There is a subtle difference between the two. A BOOL will accept without complaint
<syntaxhighlight lang="futurebasic">
window 1
Line 1,125:
implicit conversion from constant value -1 to 'BOOL'; the only well defined values for 'BOOL' are YES and NO [-Wobjc-bool-constant-conversion]
</syntaxhighlight>
On the other hand, a Boolean can be assigned not only YES, NO, _true, or _false, and 0 or 1, but also
Since FB can also work with objects, native BOOLs and booleans need to be converted to objects as demonstrated in the code below.
Line 1,190:
booleanObject variable reassigned as N0 == 0
</pre>
=={{header|Gambas}}==
|