mirror of
https://github.com/PetroProtsyk/SSharp
synced 2026-06-08 12:11:10 +00:00
18 lines
426 B
Plaintext
18 lines
426 B
Plaintext
//Global scope
|
|
a = 1;
|
|
{ //Local scope 1
|
|
var a; //Create empty variable in local scope 1
|
|
|
|
{//Local scope 2
|
|
|
|
//This will set variable to top-most scope which contains
|
|
//definition for variable, which is Local scope 1
|
|
a = 4;
|
|
}
|
|
|
|
Test.AreEqual(4, a);
|
|
|
|
}
|
|
|
|
Test.AreEqual(1, a);
|