06-19-2017, 07:21 PM
Hi guys,
It's been a while but I recently started trying to convert a program written in 'standard' Sinclair BASIC so that it would compile with ZX Basic. It's going fairly well, but I've come across a problem with the --base-string option in release 1.5.3.
Take a look at this short program, which is supposed to replace 'character 1' in a string:
If I compile this with --base-string=0 then the result is 'e/X/tXst', as I would expect.
However, if I compile with --base-string=1 then the result is 't/t/tXst' rather than 't/X/Xest'. It seems the read of char '1' respects the setting, but the write does not.
I've been having some pretty weird crash errors that look like memory being randomly overwritten - wondering if maybe this might have something to do with it (fingers crossed).
Thanks in advance for anything you can do to help!
It's been a while but I recently started trying to convert a program written in 'standard' Sinclair BASIC so that it would compile with ZX Basic. It's going fairly well, but I've come across a problem with the --base-string option in release 1.5.3.
Take a look at this short program, which is supposed to replace 'character 1' in a string:
Code:
dim st as string
cls
let st="test"
print st(1)
let st(1)="X"
print st(1)
print st
If I compile this with --base-string=0 then the result is 'e/X/tXst', as I would expect.
However, if I compile with --base-string=1 then the result is 't/t/tXst' rather than 't/X/Xest'. It seems the read of char '1' respects the setting, but the write does not.
I've been having some pretty weird crash errors that look like memory being randomly overwritten - wondering if maybe this might have something to do with it (fingers crossed).
Thanks in advance for anything you can do to help!