Task

Show how to represent the boolean states "true" and "false" in a language.

If other objects represent "true" or "false" in conditionals, note it.



Related tasks

   Logical operations


/* boolean values */
$print(true, "\n");
$print(false, "\n");
 
if 0 {
  $print("literal 0 tests true\n");
} else {
  $print("literal 0 tests false\n");
}
 
if 1 {
  $print("literal 1 tests true\n");
} else {
  $print("literal 1 tests false\n");
}
 
if $istrue(0) {
  $print("$istrue(0) tests true\n");
} else {
  $print("$istrue(0) tests false\n");
}
 
if $istrue(1) {
  $print("$istrue(1) tests true\n");
} else {
  $print("$istrue(1) tests false\n");
}