Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
--base-string=1 issue (* solved *)
#1
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:

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! Smile
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)