Delete From Array function: Difference between revisions
Appearance
Add new page (stub) |
mNo edit summary |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
[[File:Delete From Array - Terminals.png|thumb|Delete From Array function]] | [[File:Delete From Array - Terminals.png|thumb|Delete From Array function]] | ||
{{LabVIEW Palette Object Information|palette=Functions Palette/Programming/Array{{!}}Array palette|type=function|icon=Delete From Array.png}} | |||
The '''Delete From Array''' function deletes an element or subarray from an array and returns the deleted portion. | |||
== Usage == | == Usage == | ||
Connect an array to the '''n-dim array''' input terminal to delete the last element. | |||
[[File:Delete From Array - Delete Last Element.png]] | |||
Connect an index to the '''index''' terminal to delete that element. | |||
[[File: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. | |||
[[File: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. | |||
[[Category:Array Palette]] | [[Category:Array Palette]] | ||
Latest revision as of 04:41, 26 June 2020

| Object information | |
|---|---|
| Owning palette(s) | Array palette |
| Type | Function |
| Requires | Basic Development Environment |
| Icon | |
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.
Connect an index to the index terminal to delete that element.
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.
Best practice
- Do not wire a value to the index terminal to remove elements from the end of an array.


