This adds a new series of "get*" functions which can read values from the associated "value" resources. The key name of the function must match the name value of the resource for things to work. Type unification isn't yet perfect in these scenarios, so you should use casually and with caution.
20 lines
356 B
Plaintext
20 lines
356 B
Plaintext
value "hello" {
|
|
any => "whatever",
|
|
}
|
|
|
|
test "test" {
|
|
#anotherstr => "", # get it from send/recv
|
|
onlyshow => ["AnotherStr",], # displays nicer
|
|
}
|
|
|
|
Value["hello"].any -> Test["test"].anotherstr
|
|
|
|
import "value"
|
|
|
|
$ret = value.get_str("hello") # name of value resource
|
|
|
|
test "get" {
|
|
anotherstr => $ret->value,
|
|
onlyshow => ["AnotherStr",], # displays nicer
|
|
}
|