Talk:To boolean

From Kolmafia
Revision as of 00:29, 11 March 2010 by imported>Heeheehee (Created page with 'Results of this function: For strings (and probably buffers): Returns false unless the string is "true". <br /> For ints: Returns true unless the integer is 0. <br /> For floats…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Results of this function:

For strings (and probably buffers): Returns false unless the string is "true".
For ints: Returns true unless the integer is 0.
For floats: Truncates, then follows integer rules (as such, -0.7, 0, and 0.7 all return false).
For all other datatypes: Converts to an integer, then follows the integer rules. --Heeheehee 00:29, 11 March 2010 (UTC)