Error Messages/41117

Error Message

Syntax Error: Expecting '='

Description

This indicates that you have begun a subscript operation but the = doesn't appear after the index name. For example:

Reliability[Supplier]

A subscript requires an index value (or expression that computes an index value) such as

Reliability[Supplier='Supplier A']

You do not list the indexes of a variable when you used that identifier in an expression. There are other languages that require you to do so, but not in Analytica. You simply use the identifier, Reliability, if you intend for the full value to be there.

Exceptions

There are a few situations where you can omit the index from the brackets.

  1. In a dynamic offset. For example
    Dynamic( x0, Y[ Time -1] * 1.1 )
    The dynamic index can be omitted, and is shorthand for Y[@Time=@Time-1]. This case uses Slice-style positional offsets (rather than subscript-style associative indexing).
  2. When a local variable declared its dimension(s).
    Local x[ I ] := expr Do x[1]
    Here x[1] is shorthand for X[I=1]. This uses Subscript-style associational indexing.

See also

Comments


You are not allowed to post comments.