Difference between revisions of "Decision Icon Properties"

From Flowcode Help
Jump to navigationJump to search
Line 15: Line 15:
  
 
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:
 
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.
+
 
 +
See [[Calculation Icon Properties]] for a list of valid operators.
  
  
Line 37: Line 38:
 
'''Variables Arrow'''
 
'''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.
+
Clicking on the down arrow brings up the variables dialog window allowing you to select an existing variable or to [[Creating Variables|create a new one]].
  
  
Line 48: Line 49:
  
 
Flowcode treats zero as false and any non-zero value as true.
 
Flowcode treats zero as false and any non-zero value as true.
 +
 
This allows the use of variables in a true or false context.
 
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.
 
For example 'If TIMEUP' would execute the 'Yes' path if TIMEUP was non-zero.

Revision as of 14:41, 18 June 2013

<sidebar>Sidebar: Icon Properties</sidebar> Btn Decision.gifGen Decision Flowchart Icon.pngGen Decision Icon Properties.png


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.