12-07-2022 09:49 AM
Well, I am programming a QMH, which has many cases (start, load files, run files and so on), the trouble I'm trying to resolve is this:
No, that's not a "state machine" by any reasonable definition of the terms. It's a truncated picture of a diagram showing a jumbled pile of Rube Goldbeg code. Impossible to tell what's going on and what's outside the visible area or inside other cases.
Why are there So! Many! Local! Variables!? Why do you wire N when autoindexing on a FOR loop? Why is there so much duplicate code? (e.g. the code in the two sequence frames is identical except for the value of a color box! Why program it twice?)
12-12-2022 12:40 PM
Oh why not? Either the code is running or it is not. If, for any strange reason you want the code to "Break," stick Breakpoints in there! you could even use the Breakpoint Manager to enable or disable each breakpoint. Alternately (since you are so fond of unnecessary nested structures and good State management) just put your breakpoints in case structures that you can wire from boolean controls.
(I didn't say that was a good idea)