Menu
JAQForum Ver 19.10.27

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

   Page 20 of 30    
Posted: 05:13am
24 Apr 2023
Copy link to clipboard
panky
Guru


I think disco4now is right on the money. You can not sensibly use the PRINT statement when OPTION Y_AXIS UP is set. If you need to place text, then use TEXT. The manual says for use with drawing commands and I have amended the manual accordingly.
Doug.
 
Posted: 06:55pm
25 Apr 2023
Copy link to clipboard
JanVolk
Senior Member

Good day

I am exploring the latest version of MMB4W, now that I have a manual in my hands.
I run into a problem with a standard keyboard where a certain key does not respond and tested with UK and US keyboard in option keyboard.
It is the \ key or the | -key (shift + \) which works with all my other programs, but not with MMB4W. Before I dig further, I wanted to know if anyone else has this problem?

Jan
 
Posted: 07:18pm
25 Apr 2023
Copy link to clipboard
toml_12953
Guru

  JanVolk said  Good day

I am exploring the latest version of MMB4W, now that I have a manual in my hands.
I run into a problem with a standard keyboard where a certain key does not respond and tested with UK and US keyboard in option keyboard.
It is the \ key or the | -key (shift + \) which works with all my other programs, but not with MMB4W. Before I dig further, I wanted to know if anyone else has this problem?

Jan


Both of those keys work for me. The \ gives me integer division.
I use b16 running on Windows 11 with a US keyboard.

Tom L
Edited 2023-04-26 05:19 by toml_12953
 
Posted: 07:31pm
25 Apr 2023
Copy link to clipboard
LucV
Regular Member


No problem on my side either.

MMBasic V5.07.03

| / \ all work.
Option keyboard US
 
Posted: 08:08pm
25 Apr 2023
Copy link to clipboard
JanVolk
Senior Member

Gentlemen,

Thank you for responding. The problem has become a bit clearer. I have been using a separate Logitech keyboard and mouse for a while and now I see that this key appears twice on my keyboard.
You guessed it one works and the other doesn't. The one that doesn't work is to the left of the Z key and to the right of the Shift key and the one that works is to the left of the Enter key and to the right of the ' key.
The key on my laptop also works, but I never use this keyboard and with a separate screen and separate keyboard and mouse, the laptop is always closed. Now that I know all this I can move forward.
Nice day.

Jan
 
Posted: 11:38pm
26 Apr 2023
Copy link to clipboard
panky
Guru


Update to the Windows for MMBasic User Manual - tidied up a bit and corrected some errors. I have not had a lot of feedback on errors so I can only assume it is relatively correct  

MMB4W User Manual v0.86

For info, there are two versions of the User Manual:-
MMBasic for Windows v0.86odt-cond.pdf
 - this is a smaller sized version that only has page thumbnails to navigate by

and

MMB4W_User_Manual_v0.86.pdf
 - large version with bookmarks to all options/command/functions etc.

Content of both is identical - its just the navigation option that is different.

Enjoy, Doug.
Edited 2023-04-27 09:39 by panky
 
Posted: 11:45pm
26 Apr 2023
Copy link to clipboard
disco4now
Guru


hi Doug,
I think the link is not correct. For me it goes to my dropbox.

<a href="https://www.dropbox.com/home/MMB4W" target="_blank">MMB4W User Manual v0.86</a>
gerry
 
Posted: 12:06am
27 Apr 2023
Copy link to clipboard
panky
Guru


 
Posted: 12:15am
27 Apr 2023
Copy link to clipboard
lizby
Guru

Thanks very much for your good work here.
 
Posted: 12:15am
27 Apr 2023
Copy link to clipboard
Turbo46
Guru


Thanks Doug,

Sorry but one little point but it would be nice to have different footers for odd and even pages so that double sided and bound manuals could have the page number on the outer edge of the page.

Bill
 
Posted: 02:40am
27 Apr 2023
Copy link to clipboard
Turbo46
Guru


There is one funny thing: the version with the bookmarks has an extra blank page at page 106 which makes the index incorrect.

Bill
 
Posted: 04:31am
27 Apr 2023
Copy link to clipboard
Turbo46
Guru


Hi Doug,
I've started printing the manual a few pages at a time waiting for my printer to run out of ink and have found a few more 'funny' things:

Page 10. Under the heading :Differences to the Micromite version of MMBasic. The first line begins:
"Off all the different versions of MMBasic..."
Off should be Of

Also on page 10, in the table of Valid Default modes: the first three entries are shifted to the right. By an extra tab stop I assume.

Page 11, the last line on that page reads:
"red and blue are reversed compared to the CMM2 if a direct numerical value is used in this way i.e ABRG8888"
Should that read ARGB8888?

Page 14, the part:
Then type in this short program:
DO
r = RND * 255
 g = RND * 255
b = RND * 255
CIRCLE RND * 800, RND * 600, RND * 100,,, 0, RGB(r,g,b)
PAUSE 10
LOOP

The line "g = RND * 255" is not bold like the rest of the listing and is in a different font.

Also, I'd like to suggest that, for program listings, you do the same as Geoff: indent them and use a Courier font. It looks more like a computer printout (to me).

Also on page 14, near the bottom, the line:
"see the bubbles. To see how fast MMBasic for Windows can really go ,you could go back into the editor and"
The comma is in the wrong place.

Bill
 
Posted: 04:38am
27 Apr 2023
Copy link to clipboard
panky
Guru


Cheers Bill, Second one fixed, first suggestion being worked on,
Doug.
 
Posted: 04:46am
27 Apr 2023
Copy link to clipboard
Turbo46
Guru


Thanks Doug, Great job by the way.

One thing about line numbers: While you CAN use them in MMBasic, they are not respected in the way the early BASICs did.

Try:

15 print "LINE 15"
10 print "LINE 10"
20 print "LINE 20"
15 print "LINE 15 too"
end


The LINEs will be processed in the order that they are typed, LINE 15 is not inserted between LINEs 10 and 20 and two LINE 15s are OK.


Bill
 
Posted: 05:41am
27 Apr 2023
Copy link to clipboard
panky
Guru


Hi Bill,
Thanks for the great feedback - responses below
  Turbo46 said  Hi Doug,
I've started printing the manual a few pages at a time waiting for my printer to run out of ink and have found a few more 'funny' things:

Page 10. Under the heading :Differences to the Micromite version of MMBasic. The first line begins:
"Off all the different versions of MMBasic..."
Off should be Of
** fixed

Also on page 10, in the table of Valid Default modes: the first three entries are shifted to the right. By an extra tab stop I assume.
** fixed

Page 11, the last line on that page reads:
"red and blue are reversed compared to the CMM2 if a direct numerical value is used in this way i.e ABRG8888"
Should that read ARGB8888?
No, see the write up - when using numerical values, blue and red are swapped in position.

Page 14, the part:
Then type in this short program:
DO
r = RND * 255
 g = RND * 255
b = RND * 255
CIRCLE RND * 800, RND * 600, RND * 100,,, 0, RGB(r,g,b)
PAUSE 10
LOOP

The line "g = RND * 255" is not bold like the rest of the listing and is in a different font.
** fixed

Also, I'd like to suggest that, for program listings, you do the same as Geoff: indent them and use a Courier font. It looks more like a computer printout (to me).
** changed to Courier New and set in but I like the pale background differentiating code from other text (unless I get objection from Geoff/Peter)    

Also on page 14, near the bottom, the line:
"see the bubbles. To see how fast MMBasic for Windows can really go ,you could go back into the editor and"
The comma is in the wrong place.
** fixed

Bill

Regards, your other request for odd/even gutters - work in progress.
Will try and upload revised version later tonight/tomorrow.
Doug.
 
Posted: 06:03am
27 Apr 2023
Copy link to clipboard
Geoffg
Guru


  Quote  I like the pale background differentiating code from other text (unless I get objection from Geoff/Peter)

No objection from me.  In fact I like it so much that I am looking at adopting it for the future.

Geoff
 
Posted: 07:45am
27 Apr 2023
Copy link to clipboard
Turbo46
Guru


Reading more:

P17, near top, the paragraph:
"The filename is now mandatory as on MMBasic for Windows. You can now paste into AUTOSAVE using CTRL-V. When you exit AUTOSAVE with F1 or CTRL-Z. the file is saved and the program is loaded ready to..." My bolding.

Should that be: "for the CMM2"?

P17, down further, the paragraph:
"The running program is normally held in memory. This means that it will not be lost if the MMBasic for Windows is closed or the computer powered off."

This doesn't see correct. do you mean "The running program is normally held on the hard drive"? or "This means that it will be lost"?

p18,
Watchdog Timer
It is possible to use MMBasic for Windows set up so that...

Replace 'use' with 'have'?

P19, near the bottom:
"Note: you can also enter selection mode when using a USB keyboard by holding the
shift key and pressing right-arrow or down-arrow."

Is this statement valid for a windows computer? My laptop claims to have a "PC/AT Enhanced PS/2 Keyboard" and this method of selection works.

P21, "This setting is saved in non-volatile memory and automatically applied on startup."

Actually the setting is saved in an 'options.' file. Mine is saved in my Documents folder and I don't know if that can be changed.

P26, Passing Arguments by value

This has never been properly explained in any manual that I can recall so thanks for trying to clear it up.

While I understand the concept I feel the example doesn't really make it clear. The use of a LOCAL is clear and should be easily understood. The earlier swap sub clearly shows passing by reference and is probably all that is needed for that. Personally I have never used the passing by value method and after reading the manual I am not much more clear on the subject. Does:

testsub(a, b)
pass both a and b by value or reference?

What about:
testsub((a), (b))
I guess that does

but what about passing a single variable by value
testsub(a)
or does it have to be
testsub((a))

Easy enough to try and I will tomorrow

I'm done for the night, off to buy a blue ink cartridge,    

Bill
 
Posted: 09:25pm
27 Apr 2023
Copy link to clipboard
Turbo46
Guru


Hi Doug,
Still worried about passing by reference or value so I wrote a little test program:
' VRtest.bas
' An MMBasic to test and demonstrate passing
' arguments to a subroutine by reference
' or value
'
print " Test 1."
a=4
b=4
testsub((a),b) ' Passes a by value, b by reference
print a,b
print

print " Test 2."
a=4
b=4
testsub((a),(b)) ' Passes a and b by value
print a,b
print

print " Test 3."
a=4
b=4
testsub(a),(b) ' Passes a by reference, b NOT passed
print a,b
print

print " Test 4."
a=4
b=4
testsub(a),b ' Passes a by reference, b NOT passed
print a,b
print

print " Test 5."
a=4
b=4
testsub a,(b) ' Passes a by reference, b by value
print a,b
print

print " Test 6."
a=4
b=4
testsub a,b ' Passes a and b by reference
print a,b
print

print " Test 7."
a=4
b=4
testsub(a,b) ' Passes a and b by reference
print a,b
print

print " Test 8."
a=4
b=4
testsub(a+b,b) ' Passes a+b by value and b by reference
print a,b
print

print " Test 9."
a=4
b=4
testsub a+b,b ' Passes a+b by value and b by reference
print a,b
print

sub testsub(arg1,arg2)
arg1=arg1+1
arg2=arg2+1
print arg1, arg2
end sub


It seems to me that, if passing arguments by reference, you can enclose the whole list of arguments in brackets or not (tests 6 and 7).

If you want to pass any arguments by value then each argument that you want to pass by value must be enclosed in brackets and the the whole argument list MUST be enclosed in brackets. An expression (like a+b) will be passed by value and does not need to be enclosed in brackets (test 8 and 9)

MMBasic seems to take an ending bracket ')' as the end of the list of arguments so if the argument enclosed in brackets is the last one then all the arguments will be passed to the subroutine but if it is not the last argument in the list, the rest of the list will not be passed (tests 3, 4 and 5). I think it best to have a blanket rule that - when passing any argument by value then the whole list should be enclosed in brackets.

Maybe good programming practice to always enclose the whole argument list in brackets.

Programmers may like to comment?

Bill
 
Posted: 10:02pm
27 Apr 2023
Copy link to clipboard
TassyJim
Guru


MY preference is and will remain, assume passing by reference and don't change the parameter withing the sub unless that is what you really want.

The other way to 'trick' the interpreter is to use things like
testsub a*1, b*1
or testsub a+0, b+0
etc
instead of brackets.

There is more than one way to skin a cat but in this case, I think the cat would prefer to keep it's skin on.

Jim
 
Posted: 10:26pm
27 Apr 2023
Copy link to clipboard
thwill
Guru


I agree with Jim. If you are using any of those tricks to force pass by value semantics then I suggest renewing your prescription for dried frog pills.

Best wishes,

Tom
 
   Page 20 of 30    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025