![]() |
Forum Index : Microcontroller and PC projects : PicoMite 6.00.02 prospectus
![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10231 |
That would be great. Thanks Geoff. No: sorry. I'm not prepared to support two development streams. For 6.00.02 I will revert to uploading firmware to the development link on Geoff's site. Edited 2025-01-16 18:19 by matherp |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2436 |
this also works: ![]() Print double(--a%) but unfortunately this does not: ![]() Print double(+a%) my vote would be for +a% for the reasons that: + using it adds just a single token to the program's length rather than two tokens, + applying the same rule to + as is applied to - would reduce the size of and simplify the interpreter, + it is mathematically correct. one could even argue that the error produced: > > Print double(+a%) Error: Expression syntax > represents a... bug. if - is accepted as a valid unary operator that changes sign, then surely + must be accorded the same status, as a unary operator that does not change sign. as a bug fix, this could even be a good excuse for releasing a new revision of mx170 mmbasic ![]() cheers, rob :-) addendum: look what works on the mx170: > > ?+-+2 -2 > ? ---2 -2 > ? +--2 2 > ?--+2 2 > addendum 2: looks like the code that evaluates expressions for print accepts '+' as a unary operator, but the function parser does not. Edited 2025-01-16 23:58 by robert.rozee |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2436 |
addendum3: nope, it is that + as a unary operator works on numerics, but not variables Edited 2025-01-17 00:03 by robert.rozee |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10231 |
Error: Expression syntax Not on a PicoMite, works as expected ![]() |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2436 |
Error: Expression syntax Not on a PicoMite, works as expected hmmm. it truly is a bug - but just in the mx170 version! ![]() geoff? cheers, rob :-) > > a=7 > ?double(a) 14 > ?double(+7) 14 > ?double(+a) Error: Expression syntax > > ? mm.ver 5.0501 > Edited 2025-01-17 00:09 by robert.rozee |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10231 |
This also works on the PicoMite Print double(--++-+a%) |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2436 |
Print double(--++-+a%) now that's just showing off!! ![]() did a check with 5.05.05 and got the same failure: [2] Print double(+a%) Error : Expression syntax > > Micromite MKII MMBasic Ver 5.05.05 Copyright 2011-2021 Geoff Graham > cheers, rob :-) |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4301 |
For what it is worth I vaguely recollect the behaviour of the + unary operator being fixed during earlier PicoMite firmware development (and me copying the fix to MMB4L) so the syntax problem may be present on CMM2 + MMB4W depending on whether Peter backported it. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10231 |
The "fix" was incidental to an optimisation I did on the CMM2 to handle unary operators faster. It is in MMB4W and CMM2 |
||||
zeitfest Guru ![]() Joined: 31/07/2019 Location: AustraliaPosts: 574 |
After the greenwash.... |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |