Navigation
Synopsis Use of a variable that has not been declared.
Description A variable can only be used when it has been declared and initialized. This error is generated when this is not the case.

Remedy:
  • Rename the offending variable name into the name of an existing variable.
  • Introduce a new variable.
Examples Here is an example where an undeclared variables occurs in list splicing:
rascal>[1, *x, 3]
|stdin:///|(5,1,<1,5>,<1,6>): Undeclared variable: x
The remedy is here:
rascal>x = 5;
int: 5
rascal>[1, *x, 3]
list[int]: [1,5,3]
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.