Functions and Formulas  

Control & Logical  

Control & Logical

assignIf

Assigns a result if a conditional expression is true

Collection assignIf(Collection cond, Collection if)

Parameters
cond : is a conditional expression evaluated for each item
if : is the result returned if the condition is true
Result

Returns a collection compatible to the if argument. The result will contain all values of the if argument, where cond is a true expression.

Remarks

The arguments 'cond' and 'if' have to be compatible at at least one dimension, e.g. two different columns of one table.

In case you need an alternative ('else') branch, use the 'filter' function instead.

empty

Determines if a cell in a collection is empty

Collection empty(Collection x)

Parameters
x : is a collection (vector, matrix, ...)
Result

The result is a collection compatible to 'x', containing true boolean values, where 'x' is empty.

exists

Determines where there are values in a collection.

Collection exists(Collection x)

Parameters
x : is the collection
Result

The result is a collection compatible to 'x' containing a true boolean value at all positions where there is a value in 'x'.

existsOrEmpty

Checks if a container is completely empty or where it contains values.

Collection existsOrEmpty(Collection x)

Parameters
x : is the collection to check.
Result

The result is a container of boolean type, compatible to 'x'. If 'x' is empty, the result will be filled with 'true' booelan values. If 'x' contains values, the result will have a 'true' boolean value where 'x' has no value.

filter

Returns a result depending on a conditional expression.

Collection filter(Collection cond, Collection if, Collection else=nothing)

Parameters
cond : is a conditional expression evaluated for each item
if : is the result returned if the condition is true
else : is the value returned if the condition is false

ifExists

Returns the argument. All empty cells of the argument are replaced by a given value.

Collection ifExists(Collection x, Collection alt)

Parameters
x : the argument
alt : the value replacing the first argument's empty cells

inside

returns true for all values that lie inside a given range.

Object inside(Collection val, Collection l, Collection r, Collection excl=nothing)

Parameters
val : is the value to be tested.
l : is the lower limit of the range.
r : is the upper limit of the range.
excl : defines if the lower or upper limit values belong to the interval or not. Possible values are: 0= [l;r] 1= ]l;r] 2= [l;r[ 3= ]l;r[

isNothing

returns true, if argument x does not exist (NIL pointer).

boolean isNothing(Object x)

Parameters
x : is the variable to be tested.

isPartOf

returns true for all values that are contained in a given set of values.

Object isPartOf(Collection val, Collection set)

Parameters
val : is the value to be tested.
set : is a collection of valid values. This can be a reference to a tensor on a worksheet or an array, e.g. array(1,2,5,7)

maskError

Filters values with error states from a given argument. Optionally, values with error states (e.g. #inf) can be replaced by an alternative value.

Object maskError(Collection val, Collection alt=nothing)

Parameters
val : Is the source component or single value
alt : Is the optional alternative value

mGet

Collection mGet(String system, String table, String column="""""", String name1="""""", String name2="""""", String name3="""""")

Parameters
system :
table :
column :
name1 :
name2 :
name3 :

outside

returns true for all values that lie outside a given range.

Object outside(Collection val, Collection l, Collection r, Collection excl=nothing)

Parameters
val : is the value to be tested.
l : is the lower limit of the range.
r : is the upper limit of the range.
excl : defines if the lower or upper limit values belong to the interval or not. Possible values are: 0= [l;r] 1= ]l;r] 2= [l;r[ 3= ]l;r[

rangeCheck

Returns the first argument if it is inside a given range otherwise produces an error.

Collection rangeCheck(Collection value, Collection min, Collection max)

Parameters
value : is the argument to be tested
min : is the lower bound of the valid range
max : is the upper bound of the valid range

rangeLimit

Limits the first argument to a given minimum and maximum

Collection rangeLimit(Collection value, Collection min, Collection max=nothing)

Parameters
value : is the input value
min : is the lower bound of the range
max : is the upper bound of the range

retrieveHiword

returns the upper 16 bit of a 32 bit integer value

integer retrieveHiword(Collection value)

Parameters
value : is the 32 bit integer or a collection of 32 bit integers

retrieveLoword

returns the lower 16 bit of a 32 bit integer value

integer retrieveLoword(Collection value)

Parameters
value : is the 32 bit integer or a collection of 32 bit integers

throwError

Interrupts recalculation and returns an error message. The error message is shown in the session window. This function can be used for exception handling in user-defined functions.

integer throwError(integer error)

Parameters
error : An error message.

Feedback

Did you find what you needed?

If you have any further questions or suggestions to improve this page, please let us know:

=