Hi Marcus,Marcus wrote:Macro Scheduler 10.1 is now available.
Changes since v10:
Fixed: Duplicate SRTs with same name would cause infinite loop
Using Macro Scheduler Pro ver 10.1.02 I ran the following to see what would happen:
Code: Select all
Label>start
GoSub>mysub
Wait>1
Goto>start
//// Subroutines Below ////
SRT>mysub
MDL>1st sub
End>mysub
SRT>mysub
MDL>2st sub
End>mysub
Can you add to your development Wish List some way of checking for this situation and informing the user? Or is that already on there?

When the GoSub command runs, maybe it scans down through the lines of code looking for the first suitable SRT>mysub line and when it finds one, program execution continues there. Perhaps you could change the behavior so that instead it always scans through *all* lines of code and:
- if it finds zero suitable SRT> lines, it throws an error (does this today)
- if it finds only one suitable SRT> line, execution continues there (does this today)
- however, if it finds more than one suitable SRT> line, it could throw a new error...
Line: 38 Error - More than one Subroutine/Label mysub Found!
That way, the user would know right away they have duplicate subroutines with the same name. This would be especially valuable to users who use Include> to pull in subroutines from other files as duplcates are more likely.
What do you think? Doable?