Get¶
Name | Mandatory | Description | Default | Type |
---|---|---|---|---|
⬅️ Input |
Any input is ignored. | None |
||
Output ➡️ |
The output is the value read from the specified variable. | 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 |
Default |
No | The default value used if the variable is not set, the key is not present, or there is a type mismatch. | none |
Any |
Reads the value of the specified variable.
Details¶
The parameter Key
allows Get
to access a specific key in the table and read it's value.
The Default
parameter specifies a value to return in case the variable being read doesn't yeild a valid value, or the sequence is malformed, or the required key is missing from the table, etc. This allows the program to continue processing even if some expected data is missing.
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 drop elements from.
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] Set - Warning: setting an already exposed variable "str", use Update to avoid this warning.
[info] [sample-wire] gotten value: Hello
[info] [sample-wire] gotten value: 100
[info] [sample-wire] [10 20 30]
[info] [sample-wire] Void
[info] [sample-wire] [a b]
[info] [sample-wire] Key missing
[info] [sample-wire] Local
[info] [sample-wire] Global