If Task

Set conditions under which the process can continue.

If Tasks allow setting conditions under which the process can continue. The variables need to be created prior to defining the condition.

The example below shows two variables: Critical Mass and Mass with their expression name M and M0.

The mass is extracted by the previous task Mass Extraction and passed on to the If task as variable Mass[M]. The If task sets the condition M<M0. Whereas the value for M0 is given by you. If the condition is true, Pulse will execute the task Truebranch or else it will execute the task Falsebranch.


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