Core Function Bool

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
UberFoX (Talk | contribs)
(Created page with "<pre> Bool( <expression> ) </pre> === Description === Returns the TRUE(1) or FALSE(0) representation of an expression === Parameters === ==== Expression ==== An expression t...")
Newer edit →

Revision as of 23:43, 31 January 2013

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