I've noticed that REBOL doesn't have a built in if...elsif...else
syntax, like this one:
theVar: 60{This won't work}if theVar > 60 [ print "Greater than 60!"]elsif theVar == 3 [ print "It's 3!"]elsif theVar < 3 [ print "It's less than 3!"]else [ print "It's something else!"]
I have found a workaround, but it's extremely verbose:
theVar: 60either theVar > 60 [ print "Greater than 60!" ][ either theVar == 3 [ print "It's 3!" ][ either theVar < 3 [ print "It's less than 3!" ][ print "It's something else!" ] ] ]
Is there a more concise way to implement an if...else if...else
chain in REBOL?