Jump to content

Switch Icon Properties: Difference between revisions

From Flowcode Help
m Reverted edits by MartinW (talk) to last revision by ReeceL
Tag: Rollback
No edit summary
Line 1: Line 1:
<sidebar>Sidebar: Icon Properties</sidebar>
{| style="margin:auto; text-align:center;"
{| style="margin:auto; text-align:center;"
|-
|-
Line 31: Line 30:
'''Case options'''
'''Case options'''


Up to ten branches can be defined for the switch icon. The switch branches are enabled by ticking the tick boxes next to the values. The value in the case box is the value that is used to trigger that particular branch of the switch icon. If none of the values match the input parameter variable then the default branch of the switch case is used.
Up to ten branches can be defined for the switch icon. The switch branches are enabled by ticking the tick boxes next to the values.  


The value in the case box is the value that is used to trigger that particular branch of the switch icon. If none of the values match the input parameter variable then the default branch of the switch case is used.
Case values need to be contestants/literals i.e values that cannot be modified
Examples include '''5 'H' 0x23'''.


====Video instructions====
====Video instructions====


See the [http://www.youtube.com/watch?v=Op-l1YntjqY&list=PLQDWBb7bxuCgg6aJgPJcfXBMzZdLILceQ Switch] video to learn how to use the Switch icon to create various paths with different outcomes which are executed depending on the value of a variable.
See the [http://www.youtube.com/watch?v=Op-l1YntjqY&list=PLQDWBb7bxuCgg6aJgPJcfXBMzZdLILceQ Switch] video to learn how to use the Switch icon to create various paths with different outcomes which are executed depending on the value of a variable.
<div align="center">
{{#ev:youtube|Op-l1YntjqY|640}}
</div>

Revision as of 10:19, 22 March 2023

Switch icons are similar to decision icons only instead of two possible outcome branches (Yes, No) there are up to eleven.

They are particularly useful for tailoring your program to react in different ways based on an input variable.


Display Name

The name of the icon that appears on the flowchart.


Switch

This is the input parameter variable that is used to determine the branch of the switch that will be executed at run time.


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.


Case options

Up to ten branches can be defined for the switch icon. The switch branches are enabled by ticking the tick boxes next to the values.

The value in the case box is the value that is used to trigger that particular branch of the switch icon. If none of the values match the input parameter variable then the default branch of the switch case is used.

Case values need to be contestants/literals i.e values that cannot be modified Examples include 5 'H' 0x23.

Video instructions

See the Switch video to learn how to use the Switch icon to create various paths with different outcomes which are executed depending on the value of a variable.