Itemby Group Public on Thursday July 10 2008 @ 14:57:03 (1/1 Points) |
|
| Language ↪Reference ✑ Reply ✓ Stick It ✗ Ditch It ⚐ Tag It |
Simple Items
%Item%
This form is a simple reference which refers to an item with the given name in a particular context. You can think of these kind of like variables, but it isn't quite correct as there can be any number of item references which refer to the same item in the context.
Items always exist within a particular context, and this may differ for get/set.
How the content is interpreted depends on the context and is explained in rvalue expansion→.
Indirect Items
%A{Item}B%Inside an item notation it is possible to use further expansions. These are noted like above with the {'d notation. This indicates that these items are expanded and then string concatenation is done on the parts to return the name of the final Item to be used.
Such notation indicates: 1. use string expansion rules on the initial string 2. the resulting string is the Item who's content is being referred to
For example
set %ItemName% SomeItem
set %{ItemName}% TextIn this scenario is the same as
set %SomeItem% Text
String concatenation is also allowed.
set %Count% 4
set %Param{Count}% value
[/note]
Is the same as:
[code]
set %Param4% valueMap Access
%Map:Item%
Indicates the item "Item" in the map specified by "Map". Allowed as both an RValue and LValue.
Note that the actual item being referred to is the one in the map. This plays a particular role with respect to reset→ where the item is removed from the map (leaving the map object itself in place).
Used as an LValue the map will automatically be created if it doesn't already exist.
Object Reference
The form %{Item}% will use the actual object of item as the context and not the string form of it. This allows using non-strings as keys within the .test language.
TestPlan Item
