Posted: 08:20am 26 Sep 2011 |
Copy link to clipboard |
 Print this post |
|
Here's a short MMBASIC subroutine to print the current firmware version.
Call it using GOSUB 10000 and then PRINT version$
10000 ver$=STR$(MM.VER)
10010 verpos=INSTR(ver$,".")
10020 ver1$=LEFT$(ver$,verpos-1)
10030 ver2$=MID$(ver$,verpos+1,2)
10040 ver3$=RIGHT$(ver$,LEN(ver$)-verpos)
10050 ver4$=STR$(VAL(LEFT$(ver3$,2)))
10060 ver5=VAL(RIGHT$(ver3$,2)):IF ver5<>0 THEN ver5$=CHR$(ver5+64)
10070 version$=ver1$+"."+ver4$+ver5$
10080 RETURN
I'm sure others have already done this, but hey, I thought I'd share mine. I'm sure it could be done more elegantly, but this is my version$ :)
regards, Bob Devries Dalby, QLD, Australia |