Boolean values: Difference between revisions
Content added Content deleted
(Boolean values en True BASIC) |
(Boolean values en Yabasic) |
||
Line 558: | Line 558: | ||
0 OK, 0:52</pre> |
0 OK, 0:52</pre> |
||
==={{header| |
==={{header|Yabasic}}=== |
||
<lang Yabasic> |
|||
// Yabasic usa números para representar los valores true y false |
|||
// Las constantes incorporadas true y false representan uno y cero respectivamente. |
|||
//false también puede escribirse como FALSE o incluso FaLsE. |
|||
//true también puede escribirse como TRUE o incluso TrUe. |
|||
print false |
|||
print true |
|||
end |
|||
</lang> |
|||
==={{header|Visual Basic}}=== |
|||
VB has the <code>Boolean</code> data type and the constants <code>True</code> and <code>False</code>, in addition to what's listed under [[#BASIC|BASIC]], above. When used outside of a boolean context, <code>True</code> and <code>False</code> return values depending on their context -- <code>-1</code> and <code>0</code> in a numeric context, <code>"True"</code> and <code>"False"</code> if used as strings. |
VB has the <code>Boolean</code> data type and the constants <code>True</code> and <code>False</code>, in addition to what's listed under [[#BASIC|BASIC]], above. When used outside of a boolean context, <code>True</code> and <code>False</code> return values depending on their context -- <code>-1</code> and <code>0</code> in a numeric context, <code>"True"</code> and <code>"False"</code> if used as strings. |
||
<br>When converting an integer to a boolean, <code>0</code> is <code>False</code> and anything not equal to <code>0</code> is |
<br>When converting an integer to a boolean, <code>0</code> is <code>False</code> and anything not equal to <code>0</code> is |