Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i found a bug
#1
this is what was reported by fb

COOL.BAS(212) : error 31: Expected 'LOOP', found: '('

i looked and looked and couldnt find where i needed a loop
but i got to looking and im using dimensions and i had forgot to dim exmp(100) at the beggining of my program when i noticed this and put it in there it had fixed the problem and the above error went away but in a case like that shouldnt it tell you something like undimensioned variable at (line number) instead of sending you on a goose chase?
o live is to die, to die is to expel, to expel is to exist is to live without knowing to be
Reply
#2
Can you put together a smaller program that we can run to see this bug for ourselves? It doesn't even have to be a working or complete program, just as long as it demonstrates the error.

For example: Try taking your program, undoing the fix (so that you get that error message again), and then taking out parts that don't matter. Keep taking parts out until it's smaller, but still gives that error.
Reply
#3
Until 0.12 it would not report if you used ()'s with scalars or forgot using indexes with an array so the errors would be catch be other parser parts, if inside a compound statement like DO, it would show that a LOOP was missing.. it was changed weeks ago and will be included in the next release..
Reply
#4
that is what was going on v3czor the event was inside a do-loop and i understand that you have corrected this problem and will be realeased later. that being said if you would like me to i will still create a smaller program to recreate the bug just so you can see
o live is to die, to die is to expel, to expel is to exist is to live without knowing to be
Reply
#5
now the variables have no meaning or it doesnt seem right but this will recreate the error
Code:
p=1
do
a$=inkey$
c$=b$(p)
p=p+1
loop

and once you dim b$(100) it goes away
o live is to die, to die is to expel, to expel is to exist is to live without knowing to be
Reply
#6
You must DIM all your arrays in FB!
The same is true in QB if you want to be able to compile your programs...
Antoni
Reply
#7
i understand that antoni but please read back and you will understand the nature of this post
o live is to die, to die is to expel, to expel is to exist is to live without knowing to be
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)