The figure of the same address 1,2,4
x:=1
Equivalent to first declare a variablex
, then the assignment1
;x,err=f(1)
So consistent is equivalent to the assignment addressx,err1:=f(4)
The statement did not report the error is repeated because the back has a newerr1
, so the compiler will re-think the statement is behind the variable err1, just in front of the x assignment only, so the address will be the same
3,5 address is not the same
- 3
xx,err:=f(3)
is equivalent to declare and assign a new variablexx
, the address would become; - The reason is to address inconsistencies in {5}, related to the scope and go, will give priority to look for within the block, the block can not be found again in order to find the outside