Is the scope of @time
supposed to be local?
If I do the following:
x = 1
@time x = 2
Then the value of x will be 2. Why can I modify the value of a global variable x in a local scope @time
?
Similarly, I can declare variables under @time
and access them outside @time
. For example,
@time v = 3
Then the value of v will be 3. Why can I access the local variable v?
In contrast, I can’t do the above in @profile
.
Thank you.