I am a little puzzled by the variable scope in qore 0.8.12. It seems that the function parameters have the same scope as the global variables - is this possible, or am I doing something wrong?
3.1.0 kveton@kvela ~$ cat zk1.q %new-style %strict-args sub fun(string v) { print("xxx\n"); } string v = "zzz"; 3.1.0 kveton@kvela ~$ qore zk1.q unhandled QORE System exception thrown in TID 1 at 2017-01-30 08:10:32.612137 Mon +01:00 (CET) at zk1.q:4 PARSE-ERROR: local variable 'v' was already declared in the same block at zk1.q:9
Thanks for the explanation...
source share