Decision Icon Properties

From Flowcode Help
Revision as of 08:28, 16 May 2013 by ReeceL (talk | contribs) (Created page with " '''<img>''' '''<img>''' '''<img>''' Decision icons allow you to test a condition and redirect the flow according to the outcome. Icons can be placed in either branch f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


<img>


<img>


<img>


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 operators: See Calculation icon properties for a list of valid operators.


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 conditions.


DELAY = DELAY + 1

DELAY = (MYVAR + 3) * 3

NEXTBIT = LASTBIT >> 2 & MASK

AANDB = PORT_A AND PORT_B

INVX = NOT X


Variables Arrow

Clicking on the down arrow 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.