Skip to content

Instantly share code, notes, and snippets.

@raster
Last active February 23, 2023 21:32
Embed
What would you like to do?
OpenSCAD demo showing scope of variable in modules / functions.
foo = 0;
echo(foo);
m1();
m2();
m1();
echo(foo);
module m1() {
foo = 1;
echo(foo);
}
module m2() {
foo = 2;
echo(foo);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment