range

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

range v10.4.28

Generates a new array based on the given start and end numbers.

In pins 3
  • start required
    number

    Input pin for the starting number.

  • end (excl.) required
    number

    Input pin for the ending number. The number will not be taken into account for the range.

  • step
    number

    Optional input pin for the step value (default is 1).

Out pins 1
  • array
    array

    Output pin for the generated array based on the provided range.

Generates numbers starting at start, advancing by step (default 1), stopping BEFORE the value of the length pin - length is the EXCLUSIVE end bound, NOT an element count. A negative step counts down while above the end. If the step direction can never reach the end, outputs []. Example: start 0, length 5, step 2 -> [0,2,4].

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

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

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