switch

This block is part of the array group and was last modified in core v10.4.28.

switch v10.4.28

returns an array based of the given expression.

In pins 2
  • expression required
    value

    The expression to evaluate.

  • default
    array

    The default statement to be executed.

Out pins 2
  • output
    array

    Returns the array matching the expression.

  • match
    condition

    Returns true in case a match was found.

Evaluates the expression against the configured cases and outputs the array wired to the matching case, with matched=true. When no case matches, the default pin's array is output with matched=FALSE - matched reports a non-default hit, not whether an output exists. With no match and no default, array is null and matched is false.

A typical wiring for switch: the array out pin feeds length.

Studio canvas example for the switch block: typical wiring for switch.

Version history

Introduced in v10.4.28.


Back to array Return to the main group to view all sub-groups Back to array Return to the group to view all blocks within this group