MMBasic issues - INCLUDE VERSION NUMBER!

PicoMite_PICORP2350_V6.00.02RC19.uf2 (by adcockm)

Oh its there, just not in the manual… Noticed INC doesn’t have its DEC equivalent too (doesnt work).

Yep, there is no DEC, use INC x, -1.

The reason for this is historical, the MMBasic interpreter used to have a limit of ~128 commands.

Best wishes,

Tom

1 Like

For fast loops though nothing beats inc… inc,-1 is virtually 33% slower than inc and no different to say num%=num%-1 speed wise.

You should be using the 6.00.01 manual. ASC() is in there on page 159.

1 Like

Yes moved on from that to INC and DEC…

A new issue ?

option angle degrees
print mm.info$(option angle)
RADIANS !!

If you put those lines in a program, it works as expected. If you run them from a command line it reverts to radians as soon as the command is processed. I don’t know if that’s a bug or just an omission from the manual.

Darn, the thing reverts to RADIANS at every opportunity !. Will have to ensure the option is at the top of every relevant program till it’s made a permanent ‘option’ like many others… beware budding mathematicians !

That’s what the LIBRARY is for. Any options you want to be run at the start of all programs can be put into it. Here’s mine:

CONST TRUE=-1
CONST FALSE=0
OPTION ESCAPE
OPTION BASE 1
SUB MM.STARTUP
WEB NTP -4
PRINT
END SUB
SUB MM.END
PRINT
PRINT
PRINT "END PROGRAM"
PRINT
END SUB

Every time I run a program I get the constants true and false, escape codes are enabled and the option base is set to 1.