|
Forum Index : Microcontroller and PC projects : Error listings
| Author | Message | ||||
| elk1984 Senior Member Joined: 11/07/2020 Location: United KingdomPosts: 229 |
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 StatesPosts: 1427 |
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 KingdomPosts: 10582 |
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 StatesPosts: 261 |
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 KingdomPosts: 10582 |
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 StatesPosts: 261 |
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 KingdomPosts: 10582 |
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 StatesPosts: 261 |
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. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |