• Loading...
This documentation refers to a previously released version of BMC Atrium Discovery (other versions).

Table

Skip to end of metadata
Go to start of metadata
Space Search

Searching TWF 7.2

Table of Contents

Tables provide simple look-up tables that can be used by functions in pattern bodies. They have no active behaviour. Tables must be declared in module scope, not inside pattern declarations. Declarations have the following form:

table name version
  key1 -> value1;
  key2 -> value2;
  ...
end table;

Keys are literal values or expressions involving only literals; values are comma-separated sequences of literal values, or expressions involving only literals.

Tables can have a default value, specified with a key of default:

table example_table 1.0
  "one" -> "two";
  "three" -> "four";
  default -> "five";
end table;

Tables are accessed within pattern bodies using square brackets:

table_key := "one";
value := example_table\[table_key];
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.