Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:54 28 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 20 of 30    
Author Message
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 05:13am 24 Apr 2023
Copy link to clipboard 
Print this post

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.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
JanVolk
Senior Member

Joined: 28/01/2023
Location: Netherlands
Posts: 145
Posted: 06:55pm 25 Apr 2023
Copy link to clipboard 
Print this post

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
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 339
Posted: 07:18pm 25 Apr 2023
Copy link to clipboard 
Print this post

  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
 
LucV

Regular Member

Joined: 19/02/2023
Location: Netherlands
Posts: 62
Posted: 07:31pm 25 Apr 2023
Copy link to clipboard 
Print this post

No problem on my side either.

MMBasic V5.07.03

| / \ all work.
Option keyboard US
Luc's tech Blog
 
JanVolk
Senior Member

Joined: 28/01/2023
Location: Netherlands
Posts: 145
Posted: 08:08pm 25 Apr 2023
Copy link to clipboard 
Print this post

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
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 11:38pm 26 Apr 2023
Copy link to clipboard 
Print this post

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
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 897
Posted: 11:45pm 26 Apr 2023
Copy link to clipboard 
Print this post

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
Latest F4 Latest H7
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 12:06am 27 Apr 2023
Copy link to clipboard 
Print this post

Try

Manual without bookmarks
and
Manual with bookmarks (big)
D.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 12:15am 27 Apr 2023
Copy link to clipboard 
Print this post

Thanks very much for your good work here.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 12:15am 27 Apr 2023
Copy link to clipboard 
Print this post

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
Keep safe. Live long and prosper.
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 02:40am 27 Apr 2023
Copy link to clipboard 
Print this post

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

Bill
Keep safe. Live long and prosper.
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 04:31am 27 Apr 2023
Copy link to clipboard 
Print this post

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
Keep safe. Live long and prosper.
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 04:38am 27 Apr 2023
Copy link to clipboard 
Print this post

Cheers Bill, Second one fixed, first suggestion being worked on,
Doug.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 04:46am 27 Apr 2023
Copy link to clipboard 
Print this post

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
Keep safe. Live long and prosper.
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 05:41am 27 Apr 2023
Copy link to clipboard 
Print this post

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.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 06:03am 27 Apr 2023
Copy link to clipboard 
Print this post

  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
Geoff Graham - http://geoffg.net
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 07:45am 27 Apr 2023
Copy link to clipboard 
Print this post

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
Keep safe. Live long and prosper.
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 09:25pm 27 Apr 2023
Copy link to clipboard 
Print this post

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
Keep safe. Live long and prosper.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 10:02pm 27 Apr 2023
Copy link to clipboard 
Print this post

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
VK7JH
MMedit   MMBasic Help
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 10:26pm 27 Apr 2023
Copy link to clipboard 
Print this post

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
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
     Page 20 of 30    
Print this page
© JAQ Software 2024