Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:40 27 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 : MMBasic for Windows - betas

     Page 13 of 30    
Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 02:41pm 05 Apr 2022
Copy link to clipboard 
Print this post

  thwill said  Thank you Peter, that's everything I know about now "fixed".


... a state that lasted slightly less than two hours.

This will crash MMB4W rather than report some sort of "File name too long" error:

Option Search Path String$(255, "a")


Also I would expect this to clear the SEARCH PATH:

Option Search Path ""

But it looks like it sets it to the current working directory, which I would think you would achieve with:
Option Search Path "."

or, of course:
Option Search Path Cwd$


Best wishes,

Tom
Edited 2022-04-06 00:54 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9125
Posted: 03:21pm 05 Apr 2022
Copy link to clipboard 
Print this post

MMBasic.zip

The maximum pathname length that can be canonicalized is 260 (default setting of MAX_PATH in WINAPI)
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 04:46pm 05 Apr 2022
Copy link to clipboard 
Print this post

Hi Peter,

I was pinching some code from MMB4W to fix a problem in MMB4L and found this joker:

> ? Str$(-9223372036854775808) ' Minimum possible 64-bit signed integer
--9223372036854775808

Note the double -ve.

EDIT: This seems to originate in changes/fixes you made to the MMBasic core, Geoff's "original" code which MMB4L was using appears to have different issues at the limits.

Best wishes,

Tom
Edited 2022-04-06 02:56 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9125
Posted: 05:33pm 05 Apr 2022
Copy link to clipboard 
Print this post

Make this change to IntToStrPad

   if ((nbr < 0 && radix == 10 && nbr!=0x8000000000000000) || padch < 0) {                      // if the number is negative or we are forced to use a - symbol


MMBasic.zip
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 07:40pm 05 Apr 2022
Copy link to clipboard 
Print this post

Hi Peter,

The last two versions posted seem to be have a significant regression, both displaying this behaviour:



Observe the misbehaviour of the initial FILES command.

Best wishes,

Tom
Edited 2022-04-06 05:40 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9125
Posted: 09:42pm 05 Apr 2022
Copy link to clipboard 
Print this post

Oops - got true and false the wrong way round


MMBasic.zip
 
darthvader
Regular Member

Joined: 31/01/2020
Location: France
Posts: 76
Posted: 09:35am 06 Apr 2022
Copy link to clipboard 
Print this post

Hello Peter  

I just try to compile your latest code and get this error.




Is it something to set in the parameters to made it work ?
Here i am in debug mode , but when i go for 'Release x64' it compile but mmbasic start and after 2sec or so , the window disappear  

Cheers.
Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9125
Posted: 09:42am 06 Apr 2022
Copy link to clipboard 
Print this post

You should be compiling in release x86. It won't work in debug or 64-bit
Edited 2022-04-06 19:46 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 10:12am 06 Apr 2022
Copy link to clipboard 
Print this post

  matherp said  Oops - got true and false the wrong way round

MMBasic.zip


Working again thanks, and I can confirm that the Str$() bug is fixed.

Could you please confirm the expected behaviour of:
Option Search Path ""

I think it should clear the option .

Best wishes,

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

Joined: 11/12/2012
Location: United Kingdom
Posts: 9125
Posted: 10:46am 06 Apr 2022
Copy link to clipboard 
Print this post

  Quote  I think it should clear the option


Currently sets it to the current working directory. Personally don't care what it does but since apparently you do....

MMBasic.zip
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 10:55am 06 Apr 2022
Copy link to clipboard 
Print this post

  matherp said  
  Quote  I think it should clear the option

Currently sets it to the current working directory. Personally don't care what it does but since apparently you do....


My OCD applauds you.

Thanks,

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

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 11:03am 06 Apr 2022
Copy link to clipboard 
Print this post

Hi Peter,

What am I failing to understand?



Best wishes,

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

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 11:09am 06 Apr 2022
Copy link to clipboard 
Print this post

  thwill said  What am I failing to understand?


That there is no space in FontHeight and FontWidth and no error handling to catch it if you use one .

Best wishes,

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

Joined: 11/12/2012
Location: United Kingdom
Posts: 9125
Posted: 11:54am 06 Apr 2022
Copy link to clipboard 
Print this post

  Quote  and no error handling to catch it if you use one


There are hundreds (thousands ?) of places in MMbasic where additional characters in commands/functions are not trapped. To do so would increase code size and slow performance. The code with the space is returning the current font. I'm not going to change this

Try

ON ERROR IGNORE TOM  


On all versions


Edited 2022-04-06 21:58 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 12:08pm 06 Apr 2022
Copy link to clipboard 
Print this post

  matherp said  
ON ERROR IGNORE TOM  


Sure, as the kids say "Whatever!"

It's good to know that my efforts are under-appreciated and that you'd prefer bugs to be found in the field as opposed to during the beta period .

Keep up the good work,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
darthvader
Regular Member

Joined: 31/01/2020
Location: France
Posts: 76
Posted: 12:12pm 06 Apr 2022
Copy link to clipboard 
Print this post

  matherp said  You should be compiling in release x86. It won't work in debug or 64-bit


Thank you Peter , now it compile well  

Cheers.
Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9125
Posted: 12:15pm 06 Apr 2022
Copy link to clipboard 
Print this post

  Quote  It's good to know that my efforts are under-appreciated and that you'd prefer bugs to be found in the field as opposed to during the beta period


Not true, I really appreciate your testing. It was meant as a joke but is a genuine example of the issue. You can type this on any version of MMbasic and it will be accepted as anything after the IGNORE is ignored. MMbasic has the capability of checking for this (checkend function) which Geoff has used in some bits of MMBasic, presumably where he thinks it is important, but putting it everywhere would have a dramatic impact on performance
Edited 2022-04-06 22:18 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 12:29pm 06 Apr 2022
Copy link to clipboard 
Print this post

  matherp said  It was meant as a joke but is a genuine example of the issue ...


I know Peter, I'm pretty familiar with the source now even if I haven't yet had to grok it all. But (a) I thought it was a poorly chosen example "IGNORE TOM" and (b) I enjoy yanking your chain almost as much as you do mine .

Just wait until I have my integration test-suite running over the PicoMite .

Best wishes,

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

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 09:59am 07 Apr 2022
Copy link to clipboard 
Print this post

Yellow River Kingdom also works with the latest MMBasic for Windows beta.

Best wishes,

Tom
Edited 2022-04-07 20:08 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 10:12pm 08 Apr 2022
Copy link to clipboard 
Print this post

Hi Peter,

A couple of nitpicks for you:

1. If you are using READ SAVE then you get an error when you attempt the 50th SAVE, I suspect from the name of the underlying C variable "MAXRESTORE" you meant the error to occur on the 51st? FYI this is many many more restores than I would expect anyone to ever need, but thanks.

2. Observe this:

CMM2:
> Print "foo bar wombat"; : Error "banana"
foo bar wombat

banana

>


MMB4L:
> Print "foo bar wombat"; : Error "banana"
foo bar wombat

Error: banana
>


MMB4W:
> Print "foo bar wombat"; : Error "banana"
bananar wombat
>


I don't want to argue the merits of the CMM2 style vs. MMB4L since I think either is acceptable and haven't entirely settled on the behaviour of the latter, but MMB4W is clearly wrong.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
     Page 13 of 30    
Print this page
© JAQ Software 2024