|
|||||||||
|
|||||||||
Related Syntax | |||||||||
control structure | using ... key |
Syntax
using shelf-name{key-contents}] action using shelf-name key key-contents action
The current item in a shelf can be temporarily changed by the using ... key
prefix, with the shelf name in place of the ellipsis, followed by the key value.
You can also use the new syntax, using shelf-name{...}
, replacing shelf-name with the name of the shelf and the ellipsis with the key value. The item with the key you specified becomes the current item during the action that follows. After the action ends, the previous current item in the shelf becomes the current item.
Example:
process process local stream poet variable initial { "Cohen" with key "Leonard", "Angelou" with key "Maya", "Yevtushenko" with key "Yevgeny", "Handke" with key "Peter" } output "Using poet key 'Maya':%n" using poet key "Maya" output key of poet || " " || poet || "%n%n" output "Using poet{'Peter'}:%n" using poet{"Peter"} output key of poet || " " || poet || "%n%n" ; The above code produces the following results: ; ;Using poet key 'Maya': ;Maya Angelou ; ;Using poet{'Peter'}: ;Peter Handke
Related Syntax using ... item |
---- |