scope of dim statements
Posted: Wed Apr 16, 2014 12:50 pm
I`ve an problem:
In this program:
`--------------------------------
`dimtest by PaPi 16-04-2014
dim i as integer
dim j as integer
i=10
j=20
sub testsub(jj as integer)
dim i as integer
i=jj+jj
showmessage str$(i)
end sub
testsub(j)
showmessage "end"+str(i)
`-----------------------------
The fnxcompiler say :
error 1 line 8 Variable `i` already exists.
Try this, Marco!
But, I know that the outside and inside written
" dim i as integer "
instructions independent of each other. Is not that right?
PaPi
In this program:
`--------------------------------
`dimtest by PaPi 16-04-2014
dim i as integer
dim j as integer
i=10
j=20
sub testsub(jj as integer)
dim i as integer
i=jj+jj
showmessage str$(i)
end sub
testsub(j)
showmessage "end"+str(i)
`-----------------------------
The fnxcompiler say :
error 1 line 8 Variable `i` already exists.
Try this, Marco!
But, I know that the outside and inside written
" dim i as integer "
instructions independent of each other. Is not that right?
PaPi