Core Function Bool

From Sputnik Wiki
Revision as of 23:43, 31 January 2013 by UberFoX (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Bool( <expression> )

Contents

Description

Returns the TRUE(1) or FALSE(0) representation of an expression

Parameters

Expression

An expression to convert.

Return Value

Success: Returns 1.

Failure: Returns 0.

Remarks

Sputnik doesn't have a BOOL type so it converts the expression to an Int64 then checks if its higher than zero then returns 1 or 0 depending on the result.

Example

$newValue = bool( $value );
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox