Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:08 14 Nov 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 : Error listings

Author Message
elk1984

Senior Member

Joined: 11/07/2020
Location: United Kingdom
Posts: 229
Posted: 11:09pm 12 Sep 2020
Copy link to clipboard 
Print this post

Hi,



I've finally got round to programming my Colour Maximite 2 (and making lots of mistakes in the process!)  

Back in the day when I was learning to program in BBC Basic, I found the list of errors and what they meant helpful.  I'm not saying the errors aren't good in MMBasic (quite the opposite), but sometimes coding and making an error its helpful to be directed to a possible fix.

I've seen a few people on the forums mention compiling a list, but I've not been able to find anything.  I was thinking of something like:


Error: Expected A Number
Description: An attempt to assign a string to an Integer / Float variable.  
Resolution: Use VAL to convert the string

Example:

> DIM day AS Integer
> day = LEFT$(date$,2)
> PRINT day

Error: Expected a number

Correct Syntax:

> DIM day AS Integer
> day = VAL(LEFT$(date$,2))
> PRINT day

12



Do people think this would be valuable?  I'd be happy to make a start pulling a list together that could be extended by others.
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 03:57pm 13 Sep 2020
Copy link to clipboard 
Print this post

I think that this is an excellent idea. This would make a great troubleshooting resource.
Micromites and Maximites! - Beginning Maximite
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10582
Posted: 04:59pm 13 Sep 2020
Copy link to clipboard 
Print this post

  Quote  Do people think this would be valuable?  I'd be happy to make a start pulling a list together that could be extended by others.


There are 1467 (this is not a typo) calls to the error routine in the CMM2 firmware - good luck  
 
mkopack73
Senior Member

Joined: 03/07/2020
Location: United States
Posts: 261
Posted: 05:03pm 13 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Do people think this would be valuable?  I'd be happy to make a start pulling a list together that could be extended by others.


There are 1467 (this is not a typo) calls to the error routine in the CMM2 firmware - good luck  


That's calls, but does that mean there are 1467 actual different error messages/codes? ie: do like a group of 10 different places all trigger the same error message? If so that really only 1 error code for those 10 calls... ?

But yeah, a good table of the various errors would be good to have (I've run a few that made me scratch my head to understand what it meant for a bit...)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10582
Posted: 05:05pm 13 Sep 2020
Copy link to clipboard 
Print this post

  Quote  That's calls, but does that mean there are 1467 actual different error messages/codes?


No: but there is no simple way of finding out how many. Someone could possibly download the firmware and then use grep or something similar to find out
 
mkopack73
Senior Member

Joined: 03/07/2020
Location: United States
Posts: 261
Posted: 05:33pm 13 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  
  Quote  That's calls, but does that mean there are 1467 actual different error messages/codes?


No: but there is no simple way of finding out how many. Someone could possibly download the firmware and then use grep or something similar to find out


Does the error routine have some sort of if/then or case/select/switch logic for handling and producing the output? If so we could at least get a dump of that section of the code to get the count of unique error outputs. Wouldn't give us all the 1467 potential reasons for those error outputs, but would be a start...
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10582
Posted: 06:04pm 13 Sep 2020
Copy link to clipboard 
Print this post

  Quote  Does the error routine have some sort of if/then or case/select/switch logic for handling and producing the output?

No: it is just a call with a string and optional substitution fields
if(!isnamestart(*p)) error("Invalid character: @", (int)(*p));
 
mkopack73
Senior Member

Joined: 03/07/2020
Location: United States
Posts: 261
Posted: 07:47pm 13 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Does the error routine have some sort of if/then or case/select/switch logic for handling and producing the output?

No: it is just a call with a string and optional substitution fields
if(!isnamestart(*p)) error("Invalid character: @", (int)(*p));


Ah, gotcha... Yeah, would have to be a Grep type search to produce the list then... Poop.
 
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