Error Messages/40123

< Error Messages
Revision as of 16:54, 29 January 2010 by Lchrisman (talk | contribs) (Created page with '= Example Error Messages = For x do u ^ expecting := Var x; ^ expecting := = Cause = You have a syntax error in the declaration of a local variable. …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Example Error Messages

For x do u
      ^
expecting :=
Var x;
     ^
expecting :=

Cause

You have a syntax error in the declaration of a local variable. When you declare a local variable, you must assign it an initial value.

Remedy

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;
...
Comments


You are not allowed to post comments.