Error Messages/43000
Example Error Message
- Lexical error at line 1:
Choice(['US','Canada'], 1)
↑
- Expected an index for «I», the first parameter of Choice.
Description
A call to a function attempted to pass something other than an index to a parameter that expects and index. In the example above, a literal list was passed in where Choice expects an index identifier as its first parameter.
In the above case involving Choice, one resolution would be to set the Domain attribute to be ['US', 'Canada']
(i.e., a list of text), and then change the Definition to be Choice( Self, 1 )
. That applies to a few functions that can use their own domain as the index.
More generally, the typical resolution is to create a new Index variable, e.g.,
- Index Country ::=
['US', 'Canada']
And then change the Definition to Choice( Country, 1 )
, where you pass the index identifier instead of the value.
Comments
Enable comment auto-refresher