Is any one else encountering the same problem as i am having with strings?
the statement A$=“Qt” for example which does not result in a 2 byte string, but 3 bytes
where the first byte is a graphic character (cant input it, but it is a circlle with a small square within it) that represents the shift key!! This left shift! Right shift is the same although the graphic is different.
This character is injected each time shift is used within the assignment!
eg A$=“Qt” results in “?Qt” where ? is the graphic!!
also A$=“Qt Nw” results in “?Qt ?Nw”
Have reported it, but no response from Clockwork yet, just wanted to see if others have seen it? Havnt yet tried updating the image yet to see if it goes away,just using the image
on the supplied sd card!
Using the older basic supplied with the PicoCalc ?. Will say something like ‘MMBasic Version 5.09. Copyright 2024’. There is now a ‘Version 6.00. Copyright 2025’ with many bug fixes…
So this problem bit me today when writing a program. Here’s a small program to show it off:
input “test string”;a$:print
print a$
for i = 1 to len(a$)
print asc(mid$(a$,i,1))
next i
Enter something like “12:34”. You will see that an extra character, which looks like it represents the Shift key, is inserted into the string. It is not displayed in the INPUT, but is displayed in the print and shows up when the ASCII codes for the characters are displayed.
Both shift keys exhibit this “problem” and I’ve tried it with other “shift” characters too (@, #, $, etc.) with the same results.
But it seems to only happen when using the INPUT statement.
A$=“Qt” does not exhibit the problem. Perhaps the EDITor removes them.
OK AS I said it just disappeared for me! All I did is to open it up and made sure the pico was properly seated and checked the display cable! I am sure neither of those would have directly affected the problem, but maybe something else was not quite right and opening it up rectified it???
a$ = InputString("Test string")
print a$
for i = 1 to len(a$)
print asc(mid$(a$,i,1))
next i
function InputString(prompt$) as String
local r$="", b$, i, m$
print prompt$;
input b$:print
for i = 1 to len(b$)
m$ = mid$(b$,i,1)
select case asc(m$)
' Left shift, right shift, ctrl, alt
case 162, 163, 161, 165
m$=""
end select
r$=r$+m$
next i
InputString = r$
end function