diff options
author | Marius Kintel <marius@kintel.net> | 2013-05-24 14:16:20 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-05-24 14:16:20 (GMT) |
commit | 26046f6f0c4a774cbbb2af8ae7dc0e687963440c (patch) | |
tree | 38ff04fc460e8aa55134fb1ee6167fafb90a3423 /testdata/scad/misc/variable-scope-sub.scad | |
parent | eefcd6d0b271642d470cd55bc47d1579d943938e (diff) | |
parent | 95e399e06c6522f3fa67679808a1d52815368efa (diff) |
Merge branch 'master' into epec-kernel
Diffstat (limited to 'testdata/scad/misc/variable-scope-sub.scad')
-rw-r--r-- | testdata/scad/misc/variable-scope-sub.scad | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testdata/scad/misc/variable-scope-sub.scad b/testdata/scad/misc/variable-scope-sub.scad new file mode 100644 index 0000000..fda9520 --- /dev/null +++ b/testdata/scad/misc/variable-scope-sub.scad @@ -0,0 +1,24 @@ +sub_global = 15; + +module submodule() { + echo($children); + echo(submodule_var); + submodule_var = 16; + module subsubmodule() { + echo($children); + subsubmodule_var = 17; + echo(subsubmodule_var); + child(0); + } + subsubmodule() {child(0); sphere();} +} + +module submodule2() { + echo(sub_global); + echo($children); +} + +module submain() { + echo(global_var); // Undefined global var + submodule() {submodule2() sphere(); cube();} +} |