Example error messages
For x do u ^ expecting := Var x; ^ expecting := ^ expecting :=
You have a syntax error in the declaration of a local value. When you declare a local value, you must specify its initial value.
If the snippet of expression shown in the dialog doesn't seem to have anything to do with a local variable declaration (or is blank), and the position of the error shown in the dialog is at the beginning of the line, it means you have a new-line following the name of your variable, e.g.:
Or in this this case:
Var x Sum(x + y, I)
Sum(x + y, I) ^ expected :=
That's because Analytica allows you to place whitespace anywhere in an expression, and the fact that the
:= is missing doesn't become evident until the line following the Var x declaration. Hence, the dialog displays the line following. In these cases, be sure to look at the line preceding, which will be a local variable declaration (Var..Do, For..Do, MetaVar..Do, LocalAlias..Do, etc.)
In the For loop case, provide the set of values to iterate over, e.g.:
For x := I do u
In the declaration case, provide some initial value, even if it is just Null or 0, e.g.:
Var x:= Null; ...