Navigation
Synopsis Use of a variable that has not been initialized.
Description A Rascal:Variable has to be initialized before it can be used. This error is generated when an uninitialzed variable is used.

Remedy: assign a value to the variable before its use:
Examples Using the uninitialized variable x gives an error:
rascal>x + 5;
|stdin:///|(0,1,<1,0>,<1,1>): Undeclared variable: x
This can be avoided by first initializing x:
rascal>x = 3;
int: 3
rascal>x + 5;
int: 8
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.