Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Sujet n° 1539
Compilation Error -- Undefined Label
le 03/05/2007 @ 04:47 par Bob Maske
I get a compiltation error when I try to compile. It's an undefined label error and it's on the line 476, which is one line after the end of my code. I don't see anything wrong with any of my code in that location and when I comment out the "offending" code and recompile, I get the message again at the same location, one line after my code ends, but this time it refers to a different label.
I'm using SrcEdit as my editor and after I get the compile error I click on the editor button in iziBasic and it brings me back to my code to the same location each time. Does SrcEdit bring me to where the compilation error occured in my code? If it does, I wasn't able to see my problem.
What conditions will give me the Undefined Label Error other than not defining my labels correctly?
Thanks.
Bob
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497 Réponse n° 1 -------- le 04/05/2007 @ 01:19 par aldweb
visiteur
Hello Bob,
I have the feeling that this error must be because you wrote a GOTO SomeLabel or a GOSUB SomeLabel somewhere with no corresponding SomeLabel: defined. At the end of the code parsing, iziBasic detects that the SomeLabel: label was never defined and returns this error. iziBasic does not jump back to the GOTO SomeLabel or a GOSUB SomeLabel line because it did not store the position it was in the source code, so it stays on the very last line.