Quote:
Originally Posted by Alan Anderson
I don't see the connection between state machines and global variables. A state machine keeps its own state, and shouldn't need to share it with anything else, right?
If it's just persistent storage you're looking for, I suggest putting the state machine inside a single-run While with a shift register. There are at least three other ways I can think of to do what I assume you want, including local variables.
|
Some state machines do different things depending on the state of other state machines, so I use global variables in order to read other state machines' current state.
__________________
2016-2017 - Programming Mentor
► Curie Sub-Division Champions with 694, 379 & 1511
2015 - Team Captain & Head of Programming Crew
► Carson Sub-Division Champions with 1325, 20 & 1711
► First ever Israeli team on Einstein
2014 - Team Captain & Head of Programming Crew
2013 - Head of Programming Crew
2012 - Member of Programming Crew
|