I would like to run a couple of similar command sequences from a menu in Lauterbach T32 (or even from the toolbar, the issue is the same). Menu is built using something like:
menu.reprogram
(
add toolbar
(
toolitem "Say NE", "SN,r"
(
GOSUB sayNE
)
)
)
enddo
sayNE:
(
print "ne"
return
)
According to documentation, this is supposed to work. Something similar works if I remove the menu.reprogram part and only run "gosub sayNE".
But when this code is supposed from the actual menu callback, it does NOT. It prints "no such label" error message which is not really helpful.
I have even trying moving the subroutine into an included file, which is sourced in via Do ~~~~/subSayNE.cmm
followed by gosub ...
. The Do ...
command works but calling gosub
afterwards brings the same "no such label" error as before.
It looks like there is a restriction on what's allowed to do but I cannot find it documented. Is there any way to use subroutines there or is there any better trick to run repeated actions with only minor modifications (parameters)?