Page 1 of 1
Question regarding the switch function, and a thought
Posted: Wed Jul 29, 2026 3:54 pm
by alanwms
Is it possible to use a string for the switch function?
Thought:
Such a simple idea, but it would be nice to incorporate either automatic or manual file backups.
Re: Question regarding the switch function, and a thought
Posted: Wed Jul 29, 2026 5:34 pm
by Steve-Matrix
If you mean the Switch command icon, then not exactly. That said, you can create a set of constants with appropriate names and unique integer values, and then use those throughout your project. These could then be used in a Switch statement and would be make the code a lot more readable and easy to understand.
As for your second point, there are automatic backup options in the Global Options screen.
Re: Question regarding the switch function, and a thought
Posted: Wed Jul 29, 2026 5:47 pm
by medelec35
Would the attached example work for you?
You can use single string chars for the switch function.