Table¶
Name | Mandatory | Description | Default | Type |
---|---|---|---|---|
⬅️ Input |
Any input is ignored. | Any |
||
Output ➡️ |
The input to this shard is passed through as its output. | Any |
||
Name |
No | The name of the variable. | `` | String Var(Any) |
Key |
No | The key of the value to write in 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 |
Clear |
No | If we should clear this table at every wire iteration; works ONLY if it's a dynamic table (no keys or only none key); default: true. |
true |
Bool |
Type |
No | The table type to forward declare. | none |
None Type |
Creates an empty table. Useful to declare and specify types.
Details¶
Table
creates an empty table with or without a specified key (via the :Key
parameter). The created table name is defined in the :Name
parameter.
Whether the created table variable has a global scope (available to all wires on the mesh) or a local scope (available only to the wire its defined in) can be controlled via the :Global
parameter (true
for global scope, false
for local scope; default is false
).
In addition to the key and the scope, this shard can also define the table'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] [sample-wire] {}
[info] [sample-wire] {A: [1]}
[info] [sample-wire] {A: [1 2]}
[info] [sample-wire] {A: {}}
[info] [sample-wire] {A: 10.2}
[info] [sample-wire] {A: 20.1}
[info] [sample-wire] {A: {A: 0 B: 0}}
[info] [sample-wire] {A: 10.3}
[info] [sample-wire] {A: 10.3 B: 20}
[info] [sample-wire] {A: {}}
[info] [sample-wire] {A: [10]}
[info] [sample-wire] {A: [10 20]}