Forum
EXIT WHILE bug (*solved*) - Printable Version

+- Forum (https://www.boriel.com/forum)
+-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12)
+--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11)
+---- Forum: Bug Reports (https://www.boriel.com/forum/forumdisplay.php?fid=15)
+---- Thread: EXIT WHILE bug (*solved*) (/showthread.php?tid=697)



EXIT WHILE bug (*solved*) - einar - 08-19-2015

Try compiling this program:

Code:
function x() AS UBYTE
    return 1
end function

function y() AS UBYTE
    return 1
end function

WHILE x()
    IF NOT y() THEN
        EXIT WHILE
    END IF
END WHILE

It will generate the following compile error:

Code:
Error: Undefined label '__LABEL1'

Tested with latest ZX BASIC version.


Re: EXIT WHILE bug - boriel - 08-21-2015

Unfortunately, this was a bug I introduced in the latest version, to produce a better / optimized code. :oops:
Could you download ZX BASIC 1.4.0-s1953 and check if it is fixed, please? :roll:


Re: EXIT WHILE bug - einar - 08-21-2015

It works now, thank you!