Our website uses cookies to give you the best and most relevant experience. By clicking on accept, you give your consent to the use of cookies as per our privacy policy.AcceptDeny

Boolean

bool( a )

Returns 1 if the value a is larger than 0. Returns 0 if a is zero or negative.

Description

bool( a )

Returns 1 if the value a is larger than 0. Returns 0 if a is zero or negative.

Parameters

a Any value

Return value

If a>0, returns 1. Else returns 0.

Example usage

bool(3)

Returns 1.