![]() |
Forum Index : Microcontroller and PC projects : Micromite Bug report
Author | Message | ||||
Seco Newbie ![]() Joined: 20/03/2019 Location: AustraliaPosts: 5 |
Hi All (though this is probably directed towards Geoff...). I would like to report a MM bug. Issue: If a subroutine that has no parameters is the first command on a multi-command line (ie - commands separated by colons), and the colon immediately follows the subroutine name, the subroutine is never executed. Sample code: option default none option explicit option base 0 ? mm.ver ? t2 0 t1:t2 1 ' t1 is not executed t1:t2 2:t1:t1:t2 3 ' first t1 is not executed t2 4:t1:t1 :t1 t2 5 t1:t1:t1:t2 6 ' first t1 is not executed t1 :t1:t1:t2 7 t1 :t2 8 t1: ' t1 is not executed t2 9 t1 sub t1 ? "This is t1!" end sub sub t2 t as integer ? "This is t2: "+str$(t)+"!" end sub The output produced: > RUN 5.0501 This is t2: 0! This is t2: 1! This is t2: 2! This is t1! This is t1! This is t2: 3! This is t2: 4! This is t1! This is t1! This is t1! This is t2: 5! This is t1! This is t1! This is t2: 6! This is t1! This is t1! This is t1! This is t2: 7! This is t1! This is t2: 8! This is t2: 9! This is t1! > |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
The interpreter considers your first t1 as a line label t1: Line labels don't get used much now with subs and functions being available but they are still there. Jim VK7JH MMedit |
||||
Seco Newbie ![]() Joined: 20/03/2019 Location: AustraliaPosts: 5 |
Thanks Jim. As I only use line labels rarely, and always put them on a line by itself, I did not think of the subroutine name as a line label... Makes for a bit of possibly confusing syntax - I wonder if it would be possible to check if there is a matching subroutine name and if so treat it as a subroutine and not a label... One for Geoff to think about (along with all the other requests he has!). Regards Gerard |
||||
KeepIS![]() Guru ![]() Joined: 13/10/2014 Location: AustraliaPosts: 1882 |
Not a Bug but the manual appears to be incorrect unless I'm using an older manual? From the Micromite PLUS manual Ver 5.05 GUI DISPLAYBOX[code]This control does not respond to touch.[/code] However the manual says in an earlier description that the Displaybox does responds to touch, although it's not animated with touch, and TOUCH(REF) returns the control number. NANO Inverter: Full download - Only Hex Ver 8.1Ks |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |