-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or request
Description
A code
function sum(id, pr, n, a):
x := array(n)
x := 1
x += id
print(x)
x := array(n)
print(10000+x)
x += id
correctly (without errors being occurred) works with output (e.g., input is 1 239)
1
2
3
...
100
10001
10002
10003
...
10100
steps: 26
.
Meanwhile, a code
function sum(id, pr, n, a):
x := array(n)
print(x)
x := 1
x += id
x := array(n)
x += id
(e.g., input is 1 239) fails with an error
step 3, id 0, line 3: no such variable: x
.
I've found nothing about redeclaration of the variables in the documentation, and such a behavior seems inconsistent to me.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request