Report Bugs Here

Moderator: Mmiscool

User avatar
By TassyJim
#37599 I have found an odd bug in MID()
I have been using MID(test$,x,99) to get the remainder of a string. As long as the second number is longer than the string length, it returns the string remainder successfully.
However, if the length of the resulting string is shorter than the variable name, the string is padded out with the variable name.
Code: Select alltest$ = "abcdefghifkl1234"
for n = 1 to 7
test$ = mid(test$,3,99)
serialprintln test$
next n
serialprintln ""
testlongname$ = "abcdefghifkl1234"
for n = 1 to 7
testlongname$ = mid(testlongname$,3,99)
serialprintln testlongname$
next n
end


It is really good to be able to get the remainder of the string without having to use LEN() first

Jim