Delete From Array function

From LabVIEW Wiki
Jump to: navigation, search
Delete From Array function
Object information
Owning palette Array palette
Type Function
Requires Basic Development Environment

The Delete From Array function deletes an element or subarray from an array and returns the deleted portion.

Usage

Connect an array to the n-dim array input terminal to delete the last element.

Delete From Array - Delete Last Element.png

Connect an index to the index terminal to delete that element.

Delete From Array - Delete Any Element.png

By default the length input terminal is set to 1, which causes the node to remove exactly one element from the array. Connecting a wire to this terminal will cause the output terminal deleted portion to change from a single element to an array of elements, even if only one element is removed.

Delete From Array - Delete Any Number Of Elements.png

Best practice

  • Do not wire a value to the index terminal to remove elements from the end of an array.