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

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



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

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 - 2015-08-21

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 - 2015-08-21

It works now, thank you!