Difference between revisions of "boolean"

From OpenKore Wiki
Jump to navigation Jump to search
Line 10: Line 10:
  
 
Boolean options MAY be extended in future. In such a case, values of '''0''' and '''1''' SHOULD preserve the old behaviour, and more values MAY be added.
 
Boolean options MAY be extended in future. In such a case, values of '''0''' and '''1''' SHOULD preserve the old behaviour, and more values MAY be added.
 +
 +
== API ==
 +
 +
There is no API per se, just use usual Perl's logic operators.
 +
 +
=== Examples ===
 +
 +
if ($config{useDeadlyRay}) { ...
 +
 +
[[Category:Reference]]
 +
__NOTOC__

Revision as of 10:21, 17 September 2012

Overview

Empty string (unset option) or 0 means FALSE.

1 means TRUE.

Details

Option values are interpreted with Perl's Truth and Falsehood rules.

Boolean options MAY be extended in future. In such a case, values of 0 and 1 SHOULD preserve the old behaviour, and more values MAY be added.

API

There is no API per se, just use usual Perl's logic operators.

Examples

if ($config{useDeadlyRay}) { ...