Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:18 20 Apr 2026 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 : can MM.MESSAGE$ be cleared?

Author Message
wolfme
Regular Member

Joined: 26/10/2021
Location: Germany
Posts: 43
Posted: 07:43am 19 Apr 2026
Copy link to clipboard 
Print this post

Hi,

can i manually clear mm.message$?
E.g. set it to "".
If yes, how?
If no, when is mm.message$ cleared?

Wolfgang
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3151
Posted: 08:14am 19 Apr 2026
Copy link to clipboard 
Print this post

  Quote  ... They are reset to zero and an empty string by RUN, ON ERROR IGNORE or ON ERROR SKIP.

An experiment you could try.
Put ON ERROR SKIP above a statement at a suitable point in a program  after a deliberate error then Print MM.ERRMSG$.
Eg.
'... Various statements
ON ERROR SKIP
statement with a deliberate error
Print MM.ERRMSG$
'... Various statements
ON ERROR SKIP
If MM.ERRMSG$ = "" then Print "No error message"


Edit.
Yes, that works.

Well it did eventually after making some stupid mistakes!
Edited 2026-04-19 19:00 by phil99
 
wolfme
Regular Member

Joined: 26/10/2021
Location: Germany
Posts: 43
Posted: 11:13am 19 Apr 2026
Copy link to clipboard 
Print this post

Thanks, i'll try that.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3151
Posted: 11:53am 19 Apr 2026
Copy link to clipboard 
Print this post

Here is my test.

'Test clearing error messages.
On error skip
SetTick 200,Show_Pos 'this Sub does not exist
Print "An Error Occured = ";MM.ErrMsg$
On ERROR SKIP
Stepper close 'Stepper was never opened
Print "An Error Occured = ";MM.ErrMsg$
On error skip
If MM.ErrMsg$ = "" Then Print "Error message cleared"
Print MM.ErrMsg$
Print "finished"
End
Output
> RUN
An Error Occured = Cannot find label
An Error Occured = Stepper not initialized
Error message cleared

finished
>
 
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 2026