Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : MMBasic for Windows - betas

   Page 13 of 30    
Posted: 02:41pm
05 Apr 2022
Copy link to clipboard
thwill
Guru


  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
 
Posted: 03:21pm
05 Apr 2022
Copy link to clipboard
matherp
Guru

MMBasic.zip

The maximum pathname length that can be canonicalized is 260 (default setting of MAX_PATH in WINAPI)
 
Posted: 04:46pm
05 Apr 2022
Copy link to clipboard
thwill
Guru


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
 
Posted: 05:33pm
05 Apr 2022
Copy link to clipboard
matherp
Guru

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
 
Posted: 07:40pm
05 Apr 2022
Copy link to clipboard
thwill
Guru


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
 
Posted: 09:42pm
05 Apr 2022
Copy link to clipboard
matherp
Guru

Oops - got true and false the wrong way round


MMBasic.zip
 
Posted: 09:35am
06 Apr 2022
Copy link to clipboard
darthvader
Regular Member

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.
 
Posted: 09:42am
06 Apr 2022
Copy link to clipboard
matherp
Guru

You should be compiling in release x86. It won't work in debug or 64-bit
Edited 2022-04-06 19:46 by matherp
 
Posted: 10:12am
06 Apr 2022
Copy link to clipboard
thwill
Guru


  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
 
Posted: 10:46am
06 Apr 2022
Copy link to clipboard
matherp
Guru

  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
 
Posted: 10:55am
06 Apr 2022
Copy link to clipboard
thwill
Guru


  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
 
Posted: 11:03am
06 Apr 2022
Copy link to clipboard
thwill
Guru


Hi Peter,

What am I failing to understand?



Best wishes,

Tom
 
Posted: 11:09am
06 Apr 2022
Copy link to clipboard
thwill
Guru


  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
 
Posted: 11:54am
06 Apr 2022
Copy link to clipboard
matherp
Guru

  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
 
Posted: 12:08pm
06 Apr 2022
Copy link to clipboard
thwill
Guru


  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
 
Posted: 12:12pm
06 Apr 2022
Copy link to clipboard
darthvader
Regular Member

  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.
 
Posted: 12:15pm
06 Apr 2022
Copy link to clipboard
matherp
Guru

  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
 
Posted: 12:29pm
06 Apr 2022
Copy link to clipboard
thwill
Guru


  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
 
Posted: 09:59am
07 Apr 2022
Copy link to clipboard
thwill
Guru


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

Best wishes,

Tom
Edited 2022-04-07 20:08 by thwill
 
Posted: 10:12pm
08 Apr 2022
Copy link to clipboard
thwill
Guru


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
 
   Page 13 of 30    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025