If Task

Set conditions under which the process can continue.

If Tasks can evaluate any variable belonging to the Task. The variables need to be created prior to defining the condition.

The example below shows two variables: a and b, defined as user input. The If task will evaluate if the variables are equal. If so, the process will continue through the true branch else it will follow the false branch.



Figure 1.
The If condition is using OLM statements. The following conditions are supported:
Arithmetic Operators
+ (addition and unary plus)
- (subtraction and unary minus)
* (multiplication)
.* (entrywise-multiplication)
./ (right division)
.\ (left division)
: (range)
.^ (power)
Inequality Operators
< (less than)
<= (less than or equal to)
>(greater than)
>= (greater than or equal to)
== (equal to)
~= (not equal to)
= (assignment)
Logical Operators
& (and)
| (or)
~ (not)
&& (short circuit and)
|| (short circuit or)
Order of Precedence
parentheses
exponentiation
unary plus and minus, logical not
multiply and divide
add and subtract
colon
relational (inequality)
&
|
&&
||
assignment
Special Operators
( ) (parentheses)
[ ] (brackets)
{ } (braces)
@ (function handle)
% (comment)
… (continuation)
%{ %} (multi-line comment)
! (system)
Keywords
if
while
for
switch
case
global
persistent
return
try
catch
end
function
else
elseif
break
continue