Boriel Basic Forum
SHIFT 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: SHIFT bug (*solved*) (/showthread.php?tid=698)



SHIFT bug (*solved*) - einar - 2015-08-25

Try this:
Code:
DIM a AS UBYTE = 3
DIM b AS UBYTE = 2

PRINT a << (3-b)
Attempting to compile this program using latest ZX BASIC version 1.4.0s1953 will produce this error:

Code:
Error: Undefined label '__LABEL0'
It will only compile correctly if you disable compiler optimizations using "-O 1".

Previous ZX BASIC version 1.4.0s1935 was able to compile this correctly at any optimization level.


Re: SHIFT bug - boriel - 2015-08-29

Another bug due to the update after 1935.
Can you download ZX BASIC 1.4.0s1964 and test it, please? :roll:


Re: SHIFT bug - einar - 2015-09-04

It works now, thank you!