Forum
Found another 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: Found another bug (*solved*) (/showthread.php?tid=105)



Found another bug (*solved*) - LCD - 05-11-2009

Hi Boriel,

Code:
dim a$ as string

a$="This is a test"
print a$

print a$( to 4)
print a$(5 to)

This works, but
Code:
dim a$ as string

a$="This is a test"
print a$( to 4)
print a$(5 to)

This claims "Variable a never used" and compiler stops (version 1.1.9)

Edit: Btw: should POKE STRING adr,string$ and string$=PEEK STRING adr work?


Re: Found another bug - boriel - 05-11-2009

LCD Wrote:Hi Boriel,

Code:
dim a$ as string

a$="This is a test"
print a$

print a$( to 4)
print a$(5 to)

This works, but
Code:
dim a$ as string

a$="This is a test"
print a$( to 4)
print a$(5 to)

This claims "Variable a never used" and compiler stops (version 1.1.9)
Thanks, LCD :wink:
This is an optimization bug. Will fix it fo 1.1.10.

EDIT: Or should it be released as 1.2.0??