Good Morning Michael, I was a bit wacked last night and didn’t notice your ‘Edit’.
I wrote an (overly) long response first thing this morning but somehow hit the wrong key and lost it all! My manager is busy wrapping parcels atm and I’m trying to put off painting the utility, so I’ll have another go…
I’m not going to go through this guys gripes line by line but will cover some of the main points.
Let’s look at his code snippet first.
10 NUM$=”99″
20 NUM=VAL(NUM$)
30 PRINT NUM
His objection seems to be that you cannot use different variable ‘types’ with the same variable name.
Well, no you can’t and that’s a good thing. It’s one of the reasons “Basic” has a poor reputation. Every computer language has a ‘syntax’ (rules if you will) and MMB’s clearly state:
“Note: that it is illegal to use the same variable name with different types. Eg, using nbr! and nbr% in the same program would cause an error. Most programs use floating point variables for arithmetic as these can deal with the numbers used in typical situations and are more intuitive than integers when dealing with division and fractions. So, if you are not bothered with the details, always use floating point.” (Page 27)
There are good reasons for doing this, as it is very poor practice.
Here is how I would write this in MMB.
NUM$ = “99”
PRINT VAL(NUM$) ‘Which simply prints the string ($) as the number 99.
—————————
So I don’t really see the problem but if I did want to copy his code line-by-line, then it would look this in MMB:
NUM$ = “99” ‘ Define string variable
PRN% = VAL(NUM$) ‘Convert string variable to number variable
PRINT PRN% ‘ Print number variable (Integer)
—————————
MMB isn’t “Open Source” – Not correct. It is, just not under GNU/GPL. These are plenty of people on the BSF who have access to the source. Indeed, whilst Geoff still maintains the ‘source’ MMB language ‘model’, others support the various ‘platforms’ it runs on (Win/Dos, Linux, Android, STM, Pico & PIC32). Others also provide specialist support in areas such as graphics, documentation etc.
Geoff explains the reasons (and history behind it) here: MMB & Open Source
MS-Basic isn’t as good as BBC Basic etc – There are many variants of Basic, as there are with other languages. BBC Basic is excellent and very popular. Sinclair Basic (mentioned by this guy) was technically very clever to pack so much in but very much an ‘acquired’ taste (and again possibly aother reason people throw their hands up in horror when “Basic” is mentioned. I imagine there were far more users of MS-Basic than BBC though…
My first experience with MMB was running it on the PIC32. An embedded programme could be installed on a 28pin DIL package that needed only one external capacitor to run it. There wasn’t anything else like that that I knew of. The Pico 1 (now2) has simply opened up a lot more capability in a very convenient & inexpensive package.
Geoff explains how the original ‘Maximite’ came to be here: MMB – a brief
OK, I can’t put off the decorating off any longer. Have a great weekend.
Regards,
IanT