INDEX
Declaration and Attributes
Direct versus indirect declaration
Every index used in your model must be declared exactly once. You can
declare indices indirectly, through the Index
attribute of a
simple set, or directly using an Index
declaration. Note that all
previous examples show indirect declaration of indices.
Index
declaration
When you choose to declare an index not as an attribute of a set
declaration, you can use the Index
declaration. The attributes of
each single index declaration are given in
this table.
Attribute |
Value-type |
See also page |
---|---|---|
|
set-identifier |
|
|
string |
|
|
comment string |
The Range
attribute
You can assign a default binding with a specific set to directly
declared indices by specifying the Range
attribute. If you omit this
Range
attribute, the index has no default binding to a specific set
and can only be used in the context of local or implicit index binding.
The details of index binding are discussed in Binding Rules.
Example
The following declaration illustrates a direct Index
declaration.
Index c {
Range : Customers;
}