Error Messages/46191
Example error messages
- Syntax error: 'Then' required here.
- Syntax error: expecting Then.
- Syntax error: A comparison operator (like = or <>) or Then is expected here.
- Syntax error: Expected Then here. Instead you have a stray closing ')'.
Description
This occurs when you have a malformed expression where the next input token cannot be interpreted in a consistent way given the part of the expression that came before. When it says "Then expected", then you probably have a situation where your expression looks like:
And it sees the problem when it gets to the «something unexpected» part.
One example would be if you have a stray ')', like this:
... ( If x < 3 ) Then ...
↑
- Syntax error: Expecting Then ( in Analytica 6.0 )
- Syntax error: Expecting Then here. Instead, you have a stray closing ')'. ( in Analytica 6.1 )
Notice that you might come up with multiple ways of describing the problem here. If you visually match the parentheses, you might say that the If doesn't belong. Or you might say that there is an extra, unmatched ')'.
When you see the error message, it asks Do you want to Edit the Definition?. You should answer Yes, at which point it places the caret at the location were it thinks the Then should appear. Missing or extra parentheses (or other grouping constructs) is a common source of this error.
Enable comment auto-refresher