Difference between revisions of "ConvertToBoolean"
(jrfconvert import) |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | [[Category: | + | [[Category:General_Functions]] |
− | | + | {{HelpFiles}} |
====convertToBoolean==== | ====convertToBoolean==== | ||
Line 20: | Line 20: | ||
'''Examples''' | '''Examples''' | ||
− | + | ''bool b = convertToBoolean("true"); '' | |
− | + | ''if (b) print("it's true"); '' | |
− | + | ''//it's true '' | |
− | |||
− | |||
'''Availability''' | '''Availability''' |
Latest revision as of 12:00, 20 December 2011
convertToBoolean
Converts the value of an expression to bool value
Syntax
convertToBoolean(expression)
Arguments
expression: Is an expression of the type bool, string or number.
Return type
bool
Examples
bool b = convertToBoolean("true");
if (b) print("it's true");
//it's true
Availability
Version 4.8