Pop¶
Name | Mandatory | Description | Default | Type |
---|---|---|---|---|
⬅️ Input |
Any input is ignored. | None |
||
Output ➡️ |
The element popped from the sequence. | Any |
||
Name |
No | The name of the variable. | `` | String Var(Any) |
Key |
No | The key of the value to read from the table (parameter applicable only if the target variable is a table). | none |
Any |
Global |
No | If the variable is available to all of the wires in the same mesh. | false |
Bool |
Pops (removes and outputs) the last element of the sequence variable. Works only on sequences. If the variable is not a sequence or the sequence is empty, an error is thrown.
Details¶
If the variable is a table, the Key
parameter identifies which key to target. The value associated with this key must still be a sequence.
Since variables may be locally scoped (created with (Global: false)
; exists only for current wire) or globally scoped (created with (Global: true)
; exists for all wires of that mesh), both parameters Global
and Name
are used in combination to identify the correct variable to pop elements from.
Input field is ignored and the output of this shard is the element which was popped from the sequence passed to it via the Name
parameter.
Examples¶
1 2 3 4 5 6 7 8 9 10 11 |
|
[info] Set - Warning: setting an already exposed variable "seq", use Update to avoid this warning.
[info] [sample-wire] [10 20 30 40]
[info] [sample-wire] 40
[info] [sample-wire] [10 20 30]
[info] [sample-wire] [11 21 31 41]
[info] [sample-wire] 41
[info] [sample-wire] [11 21 31]