vassilych / cscs

CSCS: Customized Scripting in C#
MIT License
166 stars 47 forks source link

Question about scope #12

Open shincar opened 4 years ago

shincar commented 4 years ago

Hello Vassily,

I have a question about scope of this interpreter. I wrote a script

i = 0;

function f()
{
  i = 1;
  print(i);
}

print(i);
f();
print(i);

And expect get output 0 1 0 But it returned 0 1 1 Is it possible to let interpreter take care of scope by itself?

Regards, Adam