The sysLib.conditionAsInt() system function evaluates a logical expression (like myVar == 6) , returning 1 if the expression is true, and 0 if the expression is false. This function is maintained for compatibility with earlier versions; for new code, you can store the value of a logical expression as "true" or "false" in a BOOLEAN variable.
sysLib.conditionAsInt(logicalExpression BOOLEAN in) returns (result SMALLINT)