Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:11 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Micromite Bug report

Author Message
Seco
Newbie

Joined: 20/03/2019
Location: Australia
Posts: 5
Posted: 07:42am 20 Mar 2019
Copy link to clipboard 
Print this post

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!
>
Edited by Seco 2019-03-21
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:46am 20 Mar 2019
Copy link to clipboard 
Print this post

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: Australia
Posts: 5
Posted: 09:01am 20 Mar 2019
Copy link to clipboard 
Print this post

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: Australia
Posts: 1882
Posted: 05:11am 29 Apr 2019
Copy link to clipboard 
Print this post

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
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025