I write a little bigger program
(circa 7000 lines).
There is next segment of code in the begining:
Dd = 21
dim sit$(dd)
dim sd(dd, dd), sur$(dd), xaus(dd), sum(dd), pamet(dd, dd), pamet2(dd, dd), pamet3(dd)
dim vp(dd, dd), difer(dd, dd), d(dd), diference(dd)
dim h(dd), draft(dd), po$(dd)
dim z(dd), vrchol(dd, dd), extreem(dd), c(dd), r(dd), sum1(dd), sum2(dd)
dim bod$(16)
dim dynamic help(dd)
In the middle of program is second segment:
for I = 1 to Nsit
read A$
if eof(3) = 0 then
input # 3, B$
else
B$ = ""
end if
' permanet error "subscript out of range" appears in next line
sit$(I) = A$
A$ = REMOVE$(a$, " ")
B$ = REMOVE$(b$, " ")
if A$ <> B$ then
Neshoda2 = Neshoda2 + 1
if Neshoda2 = 1 then
locate 7, 1
call CENTRUJ ("Founded sieve errors:")
print
end if
print repeat$(11 - len(str$(I)), " "); remove$(str$(I), " "); "."; TAB(14); "sieve"; TAB(25); " Expected "; A$; TAB(45); " Founded: "; B$
end if
next I
There is a compilation error (No. 7) in the second segment (see remark) .
In fact a variable Nsit = 14. A what is strangest?
If
Dd=21
dim sit$(dd)
is changed on
Dd=21
dim sit$(21)
all work fine!
Why?
Lubos
------------------
Lubos
http://web.fsv.cvut.cz/cp1250/~svobodal/basic/
(circa 7000 lines).
There is next segment of code in the begining:
Dd = 21
dim sit$(dd)
dim sd(dd, dd), sur$(dd), xaus(dd), sum(dd), pamet(dd, dd), pamet2(dd, dd), pamet3(dd)
dim vp(dd, dd), difer(dd, dd), d(dd), diference(dd)
dim h(dd), draft(dd), po$(dd)
dim z(dd), vrchol(dd, dd), extreem(dd), c(dd), r(dd), sum1(dd), sum2(dd)
dim bod$(16)
dim dynamic help(dd)
In the middle of program is second segment:
for I = 1 to Nsit
read A$
if eof(3) = 0 then
input # 3, B$
else
B$ = ""
end if
' permanet error "subscript out of range" appears in next line
sit$(I) = A$
A$ = REMOVE$(a$, " ")
B$ = REMOVE$(b$, " ")
if A$ <> B$ then
Neshoda2 = Neshoda2 + 1
if Neshoda2 = 1 then
locate 7, 1
call CENTRUJ ("Founded sieve errors:")
end if
print repeat$(11 - len(str$(I)), " "); remove$(str$(I), " "); "."; TAB(14); "sieve"; TAB(25); " Expected "; A$; TAB(45); " Founded: "; B$
end if
next I
There is a compilation error (No. 7) in the second segment (see remark) .
In fact a variable Nsit = 14. A what is strangest?
If
Dd=21
dim sit$(dd)
is changed on
Dd=21
dim sit$(21)
all work fine!
Why?
Lubos
------------------
Lubos
http://web.fsv.cvut.cz/cp1250/~svobodal/basic/
Comment