We have SELECT CASE and SELECT EVERYCASE, but does any language make use of SELECT CASES?
Example.
Let's say I have two coordinates y, and x
I can do...
But wouldn't it be cool to just code it as:
Pete
Example.
Let's say I have two coordinates y, and x
I can do...
Code: (Select All)
SELECT CASE y
CASE IS > 0
SELECT CASE x
CASE IS > 0
CASE IS = 0
CASE IS < 0
END SELECT
CASE IS = 0
SELECT CASE x
CASE IS > 0
CASE IS = 0
CASE IS < 0
END SELECT
CASE IS < 0
SELECT CASE x
CASE IS > 0
CASE IS = 0
CASE IS < 0
END SELECT
END SELECT
But wouldn't it be cool to just code it as:
Code: (Select All)
SELECT CASES y, X
CASE y IS > 0, x IS > 0
CASE y IS > 0, x = 0
CASE y IS > 0, x IS < 0
CASE y = 0, x IS > 0
CASE y = 0, x = 0
CASE y = 0, x IS < 0
CASE y IS < 0, x IS > 0
CASE y IS > 0, x = 0
CASE y IS < 0, x IS < 0
END SELECT
Pete