Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
EDNEDN Senior Member Joined: 18/02/2023 Location: United StatesPosts: 300
Posted: 02:44pm 23 Jul 2026
Copy link to clipboard
Print this post
I think I might have stumbled onto a LongString bug in PicoMite V6.03.00 Release.
Depending on how 'Option Base' is set, lgetbyte() returns different values. With 'Option Base 0' the position information given by linstr() does not align with the information returned by lgetbyte().
I understand this could be argued either way. But it would seem to me that lgetbyte() should be consistent with the offsets returned by linstr() and used by lgetstr$().
If you flip the 'Option Base' to 1 you get different results than with it at 0.
If the answer is this is not a bug, this deviant behavior of lgetbyte() should be documented as dependent on 'Option Base'. And so far I can't find any documentation that it is dependent on 'Option Base'. Below is a program that demonstrates the inconsistency:
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11668
Posted: 03:08pm 23 Jul 2026
Copy link to clipboard
Print this post
The difference is deliberate. lgetbyte is intended to treat the longstring as a byte array which you would therefore expect to honour Option Base. It's not safe to change this behaviour as this would almost certainly break existing programs I'll add additional clarification to the user manual to make this clear. Edited 2026-07-24 01:10 by matherp
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 688
Posted: 07:39am 25 Jul 2026
Copy link to clipboard
Print this post
Update: I fixed the following by disabling the PSRAM and reenabling it.
When I try to run the program below, I get Not enough PSRAM memory in line 21 (DIM c AS POINT). It doesn't seem like it should take very much, though.
' ' "Center.zen" solves for the center and radius ' of a circle ' ' Sample program for the Zeno Interpreter by: ' ' Stephen R. Schmitt ' 962 Depot Road ' Boxborough, MA 01719 ' OPTION base 1
but no complaints about DIM c AS POINT .... 73 de OE1HGA, Gerald
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11668
Posted: 08:12am 25 Jul 2026
Copy link to clipboard
Print this post
There is no function DET or array DET so like ville56, unable to test further
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 688
Posted: 09:03am 25 Jul 2026
Copy link to clipboard
Print this post
Oops! I defined DET(n() in the library as
FUNCTION DET(n()) DET=MATH(m_determinant n()) END FUNCTION
to help writing more standard BASIC code. I just wish MMBasic could have a function return an array. Then I could write even more MAT functions to match standard BASIC. Something like this:
a()=INV(b()) ' Like MAT A = INV(B) in standard BASIC c()=TRN(r()) ' Like MAT C = TRN(R) in standard BASIC
FUNCTION INV(n()) LOCAL m(BOUND(n(),1), BOUND(n(),2)) MATH M_INVERSE n(), m() INV=m() END FUNCTION
FUNCTION TRN(n()) LOCAL m(BOUND(n(),1), BOUND(n(),2)) MATH M_TRANSPOSE n(), m() TRN=m() END FUNCTION
Edited 2026-07-25 19:21 by toml_12953
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11668
Supertech Regular Member Joined: 13/11/2016 Location: AustraliaPosts: 66
Posted: 02:09am 27 Jul 2026
Copy link to clipboard
Print this post
I upgraded to V6.03.00 on all my Webmites including OPTION WIFI ssid$, password$, hostname$, ipaddress$, mask$, gateway$, country$ with working stable. Thank you.
However,
when I type these, I get?
> list pins [LIBRARY] If MM.ADDRESS$ Then CLS Error : Expected a number
> ? MM.SUPPLY Error : MM.SUPPLY is not declared > Regards.
BarryH Regular Member Joined: 05/01/2025 Location: AustraliaPosts: 50
Posted: 03:50am 27 Jul 2026
Copy link to clipboard
Print this post
MM.SUPPLY is only designed to work for standard Pico/Pico2 boards - ie NOT Wifi, as GP25 (which is not exposed on board pins) is used by the wireless module.BarryH
ville56 Guru Joined: 08/06/2022 Location: AustriaPosts: 556
Posted: 05:45am 27 Jul 2026
Copy link to clipboard
Print this post
LIST PINS works for me ...
WebMite MMBasic RP2350A Edition V6.03.00 OPTION SYSTEM SPI GP2,GP3,GP4 OPTION SYSTEM I2C GP8,GP9 OPTION AUTORUN ON OPTION FLASH SIZE 4194304 OPTION COLOURCODE ON OPTION HEARTBEAT OFF OPTION CPUSPEED (KHz) 252000 OPTION DISPLAY 40, 145 OPTION LCDPANEL ST7789_320, PORTRAIT,GP14,GP13,GP15,GP16 OPTION WIFI JN88fg, *********, Nixie, AT OPTION TELNET CONSOLE ON OPTION SDCARD GP17
Clock> list pins Clock> GP0 1 OFF GP1 2 OFF GP2 4 Boot Reserved : SPI SYSTEM CLK GP3 5 Boot Reserved : SPI SYSTEM MOSI GP4 6 Boot Reserved : SPI SYSTEM MISO GP5 7 DOUT GP6 9 DOUT GP7 10 DOUT GP8 11 Boot Reserved : SYSTEM I2C SDA ...
maybe you should nuke the Pico first, there seems to be some old data left over.