Sequence¶
Name | - | Description | Default | Type |
---|---|---|---|---|
<input> |
Any input is ignored. | Any |
||
<output> |
The input to this shard is passed through as its output. | Any |
||
Name |
The name of the variable. | "" |
String &Any |
|
Key |
The key of the value to write in the table (parameter applicable only if the target variable is a table). | None |
String &String |
|
Global |
If the variable is available to all of the wires in the same mesh. | false |
Bool |
|
Clear |
If we should clear this sequence at every wire iteration; works only if this is the first push; default: true. | true |
Bool |
|
Type |
The sequence type to forward declare. | None |
Type |
Creates an empty sequence (or table if a key is passed).
Details¶
Sequence
creates an empty sequence when the :Key
parameter is not set. If a key is passed via this parameter Sequence
creates an empty table instead (behaving like the Table
shard). The created sequence name is defined in the :Name
parameter.
This shard can control the scope of the created sequence variable. A true
value for the :Global
parameter makes the scope of the sequence global (available to all wires on the mesh), and a false
value makes the scope local (available only to the wire its defined in).
By default a sequence created with this shard would be cleared (emptied) every time the wire is executed (since :Clear
is true
by default). To retain the sequence values across wire iterations set the :Clear
parameter to false
.
This shard can also define the sequence's inner data types via the :Types
parameter. More than one data type may be set.
Any input to this shard is ignored and instead passed through as its output.
Examples¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
[info] [shards/General/Sequence/Sequence.edn] []
[info] [shards/General/Sequence/Sequence.edn] [1]
[info] [shards/General/Sequence/Sequence.edn] [1 2]
[info] [shards/General/Sequence/Sequence.edn] {A: []}
[info] [shards/General/Sequence/Sequence.edn] {A: 10.2}
[info] [shards/General/Sequence/Sequence.edn] {A: 20.1}
[info] [shards/General/Sequence/Sequence.edn] []
[info] [shards/General/Sequence/Sequence.edn] [10.3]
[info] [shards/General/Sequence/Sequence.edn] [10.3 20]
[info] [shards/General/Sequence/Sequence.edn] {A: [10]}
[info] [shards/General/Sequence/Sequence.edn] {A: [10 20]}