I made a fairly neat discovery that our language supports without planning for it.
when get button {
...code...
}
when not get button {
... otherwise do this...
}
You can insert a not between the when and the expression. It's useful for assigning a "default behavior" to do when a button is not toggled. like set the LED to be off.
Language wise, it would be a good idea to combine them by joining them by an "else"
Will explore.
I made a fairly neat discovery that our language supports without planning for it.
You can insert a not between the when and the expression. It's useful for assigning a "default behavior" to do when a button is not toggled. like set the LED to be off.
Language wise, it would be a good idea to combine them by joining them by an "else" Will explore.