Decision icon properties
Decision icons allow you to test a condition and redirect the flow according to the outcome.
Icons can be placed in either branch from the decision icon.
Display Name
The name of the icon that appears on the flowchart.
Condition
The decision box tests this condition to see which branch to continue down. If the condition evaluates to 0 or false then the 'No' branch is chosen. If the condition evaluates to a non zero number or true then the 'Yes' branch is chosen. Conditions can be made up from numbers, variables and the following operators:
(, ) - Parentheses.
=, <> -Equal to, Not equal to.
+, -, *, /, MOD - Addition, Subtraction, Multiplication, Division & Modulus.
<, <=, >, >= - Less than, Less than or equal to, Greater than, Greater than or equal to.
>>, << - Shift right, Shift left.
NOT, AND, OR, XOR - NOT, AND, OR, Exclusive OR
Numeric values can be in decimal (unmarked) or in HEX format (preceded by 0x) or in Binary format (preceded by 0b) e.g. 255 or 0xFF or 0b01010101.
Assuming that the variables have been previously defined, all the following are valid if statements.
DELAY = 10
DELAY = MAXDELAY
NEXTBIT = LASTBIT >> 2 & MASK
AANDB = PORT_A AND PORT_B
INVX = NOT X
Variables button
This button brings up the variables dialog window allowing you to select an existing variable or to create a new one.
Swap Yes and No
Normally the 'Yes' path of execution goes off to the right of the decision icon and the 'No' path carries on down the flowchart. Select this option to swap the two branches around.
Boolean values
Flowcode treats zero as false and any non-zero value as true.
This allows the use of variables in a true or false context.
For example 'If TIMEUP' would execute the 'Yes' path if TIMEUP was non-zero.