Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:19 01 Aug 2025 Privacy Policy
Jump to

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.

Forum Index : Microcontroller and PC projects : MMBasic 4.5b bug & crash

Author Message
rave
Newbie

Joined: 24/02/2018
Location: United States
Posts: 28
Posted: 12:49am 22 Mar 2018
Copy link to clipboard 
Print this post

Hi,

Thanks for the excellent MMBasic 4.5b implementation, which I'm running on a Colour Maximite project. So far things are working out and I am looking forward to contribute some MMBasic code soon.

I found an annoying bug in MMBasic 4.5b (I believe 4.5b is the latest version that I can flash to the CMM). I have a simple function IsMatch that matches strings in a certain way and returns 1 on success.

Here is my problem:


> ? IsMatch("a","a")
1
> ? IsMatch("a","(")
Error: Expected closing bracket
> ? IsMatch("a",")")
... the screen goes blank and the interpreter crashes ...


It appears that any string with a parenthesis in it that is used as an argument in a user-defined function causes an error or a crash

The problem is not caused by the IsMatch function, I tried different ones, here is an example:

function IsMatch(a$, b$)
IsMatch = a$ = left$(b$, len(a$))
end function

- Rob
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 01:42am 22 Mar 2018
Copy link to clipboard 
Print this post

There is a V4.5C available from this thread:
https://www.thebackshed.com/forum/forum_posts.asp?TID=6772&PN=2&TPN=2
Halfway down the second page.

Jim
VK7JH
MMedit
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 02:25am 22 Mar 2018
Copy link to clipboard 
Print this post

Yes, it is a bug. It only occurs in string constants so you could use a variable containing ")" or chr$(41). The same for "(".

Sorry to say that V4.5C does not fix it.
Geoff Graham - http://geoffg.net
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 10:46am 22 Mar 2018
Copy link to clipboard 
Print this post

@Geoff,
I guess for the TFT-Maximites and the Duinomites is no v4.5C available?
Michael
causality ≠ correlation ≠ coincidence
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 12:35pm 22 Mar 2018
Copy link to clipboard 
Print this post

No, not at this time.
Geoff Graham - http://geoffg.net
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 12:46pm 22 Mar 2018
Copy link to clipboard 
Print this post

Thanks!
causality ≠ correlation ≠ coincidence
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025