Boolean values: Difference between revisions

Content added Content deleted
m (added whitespace before the TOC (table of contents), added whitespace.)
Line 724: Line 724:
For conditionals, numeric variables (including poly variables
For conditionals, numeric variables (including poly variables
with a number in them), evaluate to true or false based on
with a number in them), evaluate to true or false based on
their value
their value.


Use the defined() buildin to test if a variable is defined.
Use the defined() buildin to test if a variable is defined.
Line 744: Line 744:
if (str1) {puts("fifth test str1 is true");} // This should print
if (str1) {puts("fifth test str1 is true");} // This should print
if (str2) {puts("sixth test str2 is false");} // This should not print</lang>
if (str2) {puts("sixth test str2 is false");} // This should not print</lang>



=={{header|LiveCode}}==
=={{header|LiveCode}}==