![]() |
Forum Index : Microcontroller and PC projects : Pointer to the conversation about the LINE bug
Author | Message | ||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Hi folks, Apologies but can someone point me at the original conversation/thread describing the LINE / integer array bug that Peter has just fixed. I need to copy Peter's fix into MMB4L but want a test program first. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
hi Tom, you are probably looking for this posting: https://www.thebackshed.com/forum/ViewTopic.php?TID=16657&P=4#218184 it starts on page 4 of the thread titled "PicoMite USB betas" cheers, rob :-) Edited 2024-02-28 20:56 by robert.rozee |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Thanks Rob. MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
Tom You probably won't see the problem. I introduced it in 5.08 when I was doing the big tidy up of parsing arrays used as parameters in drawing statements. Actually, I can't see what the bug was in my code. The fix was just to revert the function getargaddress to a previous working version |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Thanks Peter, but I only copied the implementation of LINE from the PicoMite two days ago so I suspect the issue is present. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2640 |
This is a quick way to test it Edit. Just found an odd thing. It only happens if "%" is used. Dim Integer ... works properly. Edited 2024-02-28 22:26 by phil99 |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
In the un-reverted code where the integer and float arrays were using the same path you were skipping a potential "!" at the end of a variable name but not a potential "%" character, change this: do { p++; } while (isnamechar(*p)); if (*p == '!') p++; if (*p == '(') { p++; skipspace(p); if (*p != ')') { // array element *n = 1; return; } } to this: do { p++; } while (isnamechar(*p)); if (*p == '!' || *p == '%') p++; // <--------- changed line if (*p == '(') { p++; skipspace(p); if (*p != ')') { // array element *n = 1; return; } } As it happens, not an odd thing, the whole problem is that Peter's refactoring introduced a bug where the potential "%" is not skipped. Best wishes, Tom Edited 2024-03-03 04:52 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
![]() |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |