Here is one of those quirks we chatted about. MID$ (statement) is non overlap-safe. I've included a small program that demonstrates this for you. I'm not sure duplicating this behavior is really important though:
Hi Steve, thanks for the test program! That's indeed not yet handled 'correctly' by PC-BASIC, though the development branch is now in a position where it shouldn't be too painful to implement, as it is much more careful about string pointers and buffers throughout the code.
I agree that it doesn't seem overly critical, but on the other hand I've found it really hard to distinguish important quirks from unimportant ones - even where GW-BASIC's behaviour is completely insane and looks like a bug in the original, there always seems to be someone's code depending on it...
Hi Rob,
Here is one of those quirks we chatted about. MID$ (statement) is non overlap-safe. I've included a small program that demonstrates this for you. I'm not sure duplicating this behavior is really important though:
10 A$="Steve"
20 MID$(A$,2)=A$
30 PRINT "Should be SSSSS"
40 PRINT A$
Best,
Steve
Hi Steve, thanks for the test program! That's indeed not yet handled 'correctly' by PC-BASIC, though the development branch is now in a position where it shouldn't be too painful to implement, as it is much more careful about string pointers and buffers throughout the code.
I agree that it doesn't seem overly critical, but on the other hand I've found it really hard to distinguish important quirks from unimportant ones - even where GW-BASIC's behaviour is completely insane and looks like a bug in the original, there always seems to be someone's code depending on it...
Have you come across Thomas McIntyre's BASIC language user essay and associated programs? (I mean these: https://web.archive.org/web/20060410121551/http://scottserver.net/basically/geewhiz.html) I've found them a real treasure trove of information about GW-BASIC's internal workings and many quirks.
Rob
Thanks for the link!