pkg_get(P;K)
Returns a value from a package at a given key position.
Syntax
pkg_get(P;K)
Input
| Argument | Type | Description |
|---|---|---|
P |
any | The name of a package variable |
K |
any | The name of a key |
Return Value
Returns a single value from a package at position P.
If P is N/A, an error is returned.
If K is N/A, an error is returned.
Sample Usage
As an example, the following function
call:
value="{pkg_get(@package;'keyN')}"returns the value located at
keyN in list-value @package.Example
The return value of pkg_get(P;K)returns a scalar value located at key
position K in package P.
<letseq stooges="{pkg('stooge_1' 'stooge_2' 'stooge_3';'Larry' 'Curly' 'Moe')}" keys="{pkg_names(@stooges)}">
<willbe name="a_stooge" value="'{pkg_get(@stooges;'stooge_1')}'"/>
</letseq>
