syntax: Support chained if statements
to syntax: Support chained If directives
on 24 Aug 2021
Yes, that does seem sane to me, and fairly easy to read.
Okay we'll probably go with that then unless it ends up being unreasonably complicated to implement.
Currently if statements do one test, then an action depending on its result. In reality you often need to go through a list of mutually exclusive conditions and do some operation, such as doing an action based on a menu item.
Here's an example of some hacks to handle multiple checks:
It would be a lot nicer to write something like:
This seems fairly simple.
Maybe while we're at it we could make the 'Else' optional?