Chapter 8: Statements and State
This commit is contained in:
19
tests/test1.lox
Normal file
19
tests/test1.lox
Normal file
@@ -0,0 +1,19 @@
|
||||
var a = "global a";
|
||||
var b = "global b";
|
||||
var c = "global c";
|
||||
{
|
||||
var a = "outer a";
|
||||
var b = "outer b";
|
||||
{
|
||||
var a = "inner a";
|
||||
print a;
|
||||
print b;
|
||||
print c;
|
||||
}
|
||||
print a;
|
||||
print b;
|
||||
print c;
|
||||
}
|
||||
print a;
|
||||
print b;
|
||||
print c;
|
||||
Reference in New Issue
Block a user