Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:03 29 Nov 2024 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 : PicoMite/PicoMiteVGA/WebMite V5.07.07 release candidates

     Page 6 of 13    
Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 12:41pm 20 Apr 2023
Copy link to clipboard 
Print this post

  matherp said  Appears so - presumably I copied from MM2


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 Kingdom
Posts: 9139
Posted: 12:43pm 20 Apr 2023
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 4047
Posted: 12:49pm 20 Apr 2023
Copy link to clipboard 
Print this post

  matherp said  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.

Possibly, but I'm not convinced by that argument .


  matherp said  Definitely not my code - it has a comment!

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 Kingdom
Posts: 9139
Posted: 12:57pm 20 Apr 2023
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 4047
Posted: 01:04pm 20 Apr 2023
Copy link to clipboard 
Print this post

  matherp said  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


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 Kingdom
Posts: 9139
Posted: 01:08pm 20 Apr 2023
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 4047
Posted: 01:10pm 20 Apr 2023
Copy link to clipboard 
Print this post

  matherp said  CHANGE MADE and UPLOADED


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 Kingdom
Posts: 4047
Posted: 01:11pm 20 Apr 2023
Copy link to clipboard 
Print this post

Snap!
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9139
Posted: 02:07pm 20 Apr 2023
Copy link to clipboard 
Print this post

Try this


PicoMite.zip
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 02:45pm 20 Apr 2023
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 9139
Posted: 02:51pm 20 Apr 2023
Copy link to clipboard 
Print this post

  Quote  though the behaviour for user errors and system errors is different.


In what way?
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 03:00pm 20 Apr 2023
Copy link to clipboard 
Print this post

  matherp said  In what way?

> 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 Kingdom
Posts: 9139
Posted: 03:05pm 20 Apr 2023
Copy link to clipboard 
Print this post

  Quote  AFAIK the CMM2, MMB4W and MMB4L never (?) show the contents of the line throwing the error.


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 Kingdom
Posts: 4047
Posted: 03:14pm 20 Apr 2023
Copy link to clipboard 
Print this post

  matherp said  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


ACK.
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 06:42pm 20 Apr 2023
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 9139
Posted: 07:00pm 20 Apr 2023
Copy link to clipboard 
Print this post

No - only the WebMite
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 08:31pm 20 Apr 2023
Copy link to clipboard 
Print this post

  matherp said  No - only the WebMite


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: Australia
Posts: 6102
Posted: 04:00am 22 Apr 2023
Copy link to clipboard 
Print this post

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: Australia
Posts: 899
Posted: 04:22am 22 Apr 2023
Copy link to clipboard 
Print this post

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: Australia
Posts: 6102
Posted: 05:51am 22 Apr 2023
Copy link to clipboard 
Print this post

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
© JAQ Software 2024