![]() |
|
--base-string=1 issue (* 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: --base-string=1 issue (* solved *) (/showthread.php?tid=805) |
--base-string=1 issue (* solved *) - LTee - 2017-06-19 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 stringIf 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!
Re: --base-string=1 issue - boriel - 2017-06-21 Yes, I've tested it and I can confirm it's a bug. :oops: I'm working to fix it. Re: --base-string=1 issue - LTee - 2017-06-22 Thanks, boriel - much obliged. ![]() Usually this wouldn't be a problem because I would be writing for ZX Basic, but in this case it's a listing written for Spectrum BASIC first so all the alignments are 1-based rather than zero. Re: --base-string=1 issue - boriel - 2017-06-24 Okay, i think it is fixed. Can you check version 1.6.2 and tell me if it works ok, please? :roll: Re: --base-string=1 issue - LTee - 2017-06-24 Okay, first the good news - the 'base=1' string handling seems to work great now, many thanks! ![]() Now the bad news... there's something weird going on when I perform calculations on memory pointers. Edit: moved this out into a separate bug report. Re: --base-string=1 issue - boriel - 2017-06-24 This should be asked in a new question :roll: Can you please start a new bug question? (I can split this post for you, if you like) :wink: Re: --base-string=1 issue - LTee - 2017-06-25 Oops, of course - sorry! I've split it out, so you can set this one to solved now. Re: --base-string=1 issue - boriel - 2017-06-25 LTee Wrote:Oops, of course - sorry! I've split it out, so you can set this one to solved now.Thanks! :roll: |