Bug in string handling in SMSQ/E

Anything QL Software or Programming Related.
User avatar
NormanDunbar
Forum Moderator
Posts: 2490
Joined: Tue Dec 14, 2010 9:04 am
Location: Buckie, Scotland
Contact:

Re: Bug in string handling in SMSQ/E

Post by NormanDunbar »

:D :D :D :D :D


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Derek_Stewart
Font of All Knowledge
Posts: 4775
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Bug in string handling in SMSQ/E

Post by Derek_Stewart »

Hi,

I assumed that performing a reverse string slice was was not allowed, though it is not stated thst this is not allowed. I used a common sense approach to the issue.

The string length in podition zero, only causes problems when converting other BASIC programmes to S*BASIC. But if one knows about this it is not a problem.


Regards, Derek
User avatar
NormanDunbar
Forum Moderator
Posts: 2490
Joined: Tue Dec 14, 2010 9:04 am
Location: Buckie, Scotland
Contact:

Re: Bug in string handling in SMSQ/E

Post by NormanDunbar »

I had a chat, via email, with Wolfgang on this matter and he is of the opinion that:
  • Debugging SuperBASIC is an absolute pain!
  • a$(2 to 1) or a$(1 to 0) giving an empty string should possible result in an error instead.
  • Using negative numbers, he thinks that the code treats numbers as unsigned, so that a$(1 to -1) is being read as a$(1 to $FFFF) which is as per the results, so makes sense.
Given his last point above, I did try to find it in the source code to see if it matches what he thinks, and for the life of me, I couldn't find it! I suspect this is why he made his first point!


Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Post Reply