http://zorba.io/modules/excel/logical

View as XML or JSON.

This is a library module offering the same set of functions defined by Microsoft Excel, under Logical Functions.

Function Summary

and ($values as xs:anyAtomicType*) as xs:boolean

Returns TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE.

and ($arg1 as xs:anyAtomicType, $arg2 as xs:anyAtomicType) as xs:boolean

Returns TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE.

if ($logical_test as xs:boolean, $value_if_true as item()*, $value_if_false as item()*) as item()*

Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.

or ($values as xs:anyAtomicType*) as xs:boolean

Returns TRUE if any argument is TRUE; FALSE if all arguments are FALSE.

or ($arg1 as xs:anyAtomicType, $arg2 as xs:anyAtomicType) as xs:boolean

Returns TRUE if any argument is TRUE; FALSE if all arguments are FALSE.

Functions

and#1

declare  function excel-logical:and($values as xs:anyAtomicType*) as xs:boolean
Returns TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE.

Parameters

values as xs:anyAtomicType
the sequence of arguments.

Returns

xs:boolean
TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE.

and#2

declare  function excel-logical:and($arg1 as xs:anyAtomicType, $arg2 as xs:anyAtomicType) as xs:boolean
Returns TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE.

Parameters

arg1 as xs:anyAtomicType
the first argument.
arg2 as xs:anyAtomicType
the second argument.

Returns

xs:boolean
TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE.

if#3

declare  function excel-logical:if($logical_test as xs:boolean, $value_if_true as item()*, $value_if_false as item()*) as item()*
Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.

Parameters

logical_test as xs:boolean
is any value or expression that can be evaluated to TRUE or FALSE.
value_if_true as item()
the value that is returned if logical_test is TRUE.
value_if_false as item()
the value that is returned if logical_test is FALSE.

Returns

item()*
One value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.

or#1

declare  function excel-logical:or($values as xs:anyAtomicType*) as xs:boolean
Returns TRUE if any argument is TRUE; FALSE if all arguments are FALSE.

Parameters

values as xs:anyAtomicType
the sequence of arguments.

Returns

xs:boolean
TRUE if any argument is TRUE; FALSE if all arguments are FALSE.

or#2

declare  function excel-logical:or($arg1 as xs:anyAtomicType, $arg2 as xs:anyAtomicType) as xs:boolean
Returns TRUE if any argument is TRUE; FALSE if all arguments are FALSE.

Parameters

arg1 as xs:anyAtomicType
the first argument.
arg2 as xs:anyAtomicType
the second argument.

Returns

xs:boolean
TRUE if any argument is TRUE; FALSE if all arguments are FALSE.