Boolean values: Difference between revisions
Content added Content deleted
PatGarrett (talk | contribs) m (→{{header|360 Assembly}}: Superfluous blanks suppressed) |
m (Added implementation for Ursa) |
||
Line 1,507: | Line 1,507: | ||
<lang Bash>true && echo "true" || echo "false"</lang> |
<lang Bash>true && echo "true" || echo "false"</lang> |
||
=={{header|Ursa}}== |
|||
Ursa has the boolean data type which can be declared using the declare (or decl) function. |
|||
<lang ursa>decl boolean bool</ursa> |
|||
Boolean values can be set to either true or false, or the result of an expression. |
|||
<lang ursa>set bool true |
|||
# same as |
|||
set bool (= 2 2) |
|||
</lang> |
|||
or |
|||
<lang ursa>set bool false |
|||
# same as |
|||
set bool (not (= 2 2)) |
|||
</lang> |
|||
=={{header|Visual Basic}}== |
=={{header|Visual Basic}}== |