GeoGen Script reference

The script attempted to read or write an undefined variable.

See the standard library documentation to see a list of all predefined variables/properties.

A script defined variable must be declared in code executed before the variable is referenced (this applies to both globals and locals).

var a;
a = 1; // OK
b = 2; // GGE2202, b is never declared
c = 3; // GGE2202, c is declared after it is first referenced
var c;
function WriteD(x)
var l;
l = 4; // This always works, l is local variable in WriteD correctly declared before it is accessed
d = x; // d is not a local variable in WriteD, so global variable d has to be declared. Whether this fails will depend on whether global d was declared before this function was called, see below.
WriteD(5); // GGE2202 inside WriteD (global variable d was not declared yet)
global d;
WriteD(6); // OK, global variable d was declared correctly
// d is now 6