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 : PicoMite/PicoMiteVGA/WebMite V5.07.07 release candidates
Page 6 of 13 | |||||
Author | Message | ||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4047 |
Odd, it also means the EDITor doesn't automatically navigate to the location of the error - perhaps something to look at for 5.07.08 ? Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
I presume this is why Geoff has done it as you can argue a "user" error shouldn't trigger the editor positioning as the user knows he put it there. Definitely not my code - it has a comment! Edited 2023-04-20 22:44 by matherp |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4047 |
Possibly, but I'm not convinced by that argument . It does have your idiosyncratic use of whitespace though ... that may not be fair, the whitespace throughout is idiosyncratic. Almost the first thing I did when starting MMB4L was convert the whole (DOS) source-base to UNIX line-endings and replace all the Tab characters. I also tried feeding the whole lot to the clang prettifier but it didn't know what to make of all the trailing comments. Best wishes, Tom Edited 2023-04-20 22:49 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
It is trivial to change - just comment out the line - I've tested and it then works as you want. It's another where only you probably ever use it so I'll make the change since no-one else will notice CHANGE MADE and UPLOADED Edited 2023-04-20 23:01 by matherp |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4047 |
I really don't mind, I still don't think it would match the error format of the other platforms which put the line number on the same line as the message so either way I will need to update the firmware tests for the PM. TBH I think that on all platforms the error code, message, line number and filename (for platforms with #INCLUDE) should all be independently stored and retrievable with appropriate MM.INFO calls. But I don't expect you to do that, and it doesn't figure highly on my TODO list either. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
CMM2 and MMB4W have completely different error handling Just tested again and this is why Geoff has done it RUN [29] Error ("splod") Error : splod It prints the line and then the error string so I'll revert for the moment Edited 2023-04-20 23:09 by matherp |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4047 |
Hah, that now prints the error message twice: > list Print "foo" Error "bar" End > run foo [2] Error "bar" Error : bar > I don't think the other platforms print the text of the offending line, so that's probably why Geoff suppressed the message for user ERRORs. Just revert it Peter, I was only seeking clarification on the expected behaviour. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4047 |
Snap! Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
Try this PicoMite.zip |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4047 |
Thanks, that works, though the behaviour for user errors and system errors is different. I appreciate, but really didn't need you to make these changes to ERROR, I just wanted to know what the expected behaviour was so I could validate it correctly . Best wishes, Tom Edited 2023-04-21 00:45 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
In what way? |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4047 |
> load "errors.bas" > list Print "Hello" Error "foo" End > run Hello [2] Error : foo > edit ... > list Print "Hello" Error foo End > run Hello [2] Error foo Error : Expected a string In the first case, for what I'm calling the "user error", the output includes: - the offending line number - the error message - NOT the contents of the line throwing the error In the second case, for what I'm calling the "system error", the output includes: - the offending line number - the error message - AND the contents of the line throwing the error. AFAIK the CMM2, MMB4W and MMB4L never (?) show the contents of the line throwing the error. Again, not expecting you to do anything about it . Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
I seem to remember that was criticised on the CMM2 because it didn't. Anyway I'll leave the latest version as per the one just posted as it does now position the editor |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4047 |
ACK. Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4047 |
Does the PicoMite VGA not have the JSON$() function ? or am I not trying hard enough: > Dim data%(50) > ? Json$(data%(), "foo") Error : Dimensions Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
No - only the WebMite |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4047 |
Never mind, have worked around it. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6102 |
I am not sure when mm.info(flash size) stopped working... OPTION LIST PicoMite MMBasic Version 5.07.07RC6 OPTION FLASH SIZE 16777216 > print MM.INFO(DISK SIZE) 15364096 > print MM.INFO(FLASH SIZE) 0 > Returns zero for all modules I have. Jim VK7JH MMedit MMBasic Help |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 899 |
Might be FLASHTOP now. Seems to be in source now and FLASH SIZE is not. So FLASHTOP plus DISK SIZE would give FLASH SIZE. > ? MM.info(FLASHTOP) 1413120 > > ? mm.info(disk size) 15364096 >? (1413120+15364096)/1024 16384 (16M) Latest F4 Latest H7 |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6102 |
I found it further down the source MM.INFO(OPTION FLASH SIZE) Manual needs an update VK7JH MMedit MMBasic Help |
||||
Page 6 of 13 |
Print this page |