Jump to content

Build Array function: Difference between revisions

From LabVIEW Wiki
Add contents
mNo edit summary
 
Line 1: Line 1:
[[File:Build Array - Terminals.png|thumb|Build Array function]]
[[File:Build Array - Terminals.png|thumb|Build Array function]]


{{LabVIEW Palette Object Information|palette=Functions Palette/Programming/Array{{!}}Array palette|type=function}}
{{LabVIEW Palette Object Information|palette=Functions Palette/Programming/Array{{!}}Array palette|type=function|icon=Build Array.png}}


The '''Build Array''' function builds an array from one or more elements or arrays. The output array contains the elements in the same order they are connected to the node (from top to bottom).
The '''Build Array''' function builds an array from one or more elements or arrays. The output array contains the elements in the same order they are connected to the node (from top to bottom).

Latest revision as of 12:05, 29 June 2020

Build Array function
Object information
Owning palette(s) Array palette
Type Function
Requires Basic Development Environment
Icon

The Build Array function builds an array from one or more elements or arrays. The output array contains the elements in the same order they are connected to the node (from top to bottom).

Usage

Connect an element or array to the input terminal. This creates a new array one dimension higher than the input element.

Add more elements or arrays by dragging the upper or lower side of the node. Elements are added from top to bottom in the order they are connected to the node.

Elements connected to this node can be of the same dimension or one dimension higher. It is not possible to build an array from elements that are more than one dimension apart.

Best practice

  • Whenever possible connect arrays before elements to reduce the chance of memory reallocation.
  • For one-dimensional arrays, use Reverse 1D Array to append elements to the beginning (reverse the output array to get the original order).

See also