LoginLogin
Might make SBS readonly: thread

PUSH/UNSHIFT on uninitialized strings in arrays.

Root / SmileBASIC Bug Reports / [.]

12Me21Created:
This does not work:
DIM A$[1]
PUSH A$[0],"!"
But this does:
DIM A$[1]
A$[0]=""
PUSH A$[0],"!"
And this:
DIM A$[1]
INC A$[0],"!"

COPY seems to do it too. During my fiddling, I found that RINGCOPY doesn't treat strings as arrays like PUSH, UNSHIFT, COPY, yadda yadda do.
DIM A$[1]
COPY A$[0],0,"!" 'Works fine
RINGCOPY A$[0],0,"!" 'Type Mismatch Error
Wonder why. Also, I used to work with strings a lot when I began learning SB. I wonder how this bug went unnoticed for so long and how much my virgin programmer self has suffered because of it. Edit: didn't take me long to find out why RINGCOPY is different, it simply doesn't allow strings, which is odd because that doesn't seem to be mentioned in its manual page. I get that it's for Sound Processing though, it's just not explicit in the documentation that the function doesn't work on string arrays.