If I have some conditional logic defined and the code I need to run within an IF
block is just repeated commands, is it possible to define a list or an array of string values and then have a set of commands iterate through each value one after the other rather than duplicating code?
I wasn’t sure if there were any gotchas with running a loop like this if possible within an IF
block mattered or not but if so, I’m curious if this is possible if even just not within an IF
block, if support could provide a simple example of how to write such a loop to iterate two dummy string values across maybe two separate commands?
Technical Specs
- Flexy 201 running from BASIC IDE
Example Logic
IF(TriggerTag1@ = 1) THEN
SETSYS TAG, "Load", "Tag1"
SETSYS TAG, "LogEnabled",1
SETSYS TAG, "SAVE"
SETSYS TAG, "Load", "Tag2"
SETSYS TAG, "LogEnabled",1
SETSYS TAG, "SAVE"
SETSYS TAG, "Load", "Tag3"
SETSYS TAG, "LogEnabled",1
SETSYS TAG, "SAVE"
PRINT "Logging Enabled Successfully"
ENDIF