I've been trying to clean up IF statements in the game I'm working on. Would it be hard to have SELECT CASE work not just with variables but also with arrays and UDTs?
Imagine:
SELECT CASE flag ' (booleans)
CASE .drawShip: .........
CASE .explode: .........
CASE .endRound: .........
END SELECT
Or:
SELECT CASE fatArray()
CASE 0 TO 50: ..............
CASE 51 TO UBOUND(fatArray): ..........
END SELECT
Would this be cool / useful?
Imagine:
SELECT CASE flag ' (booleans)
CASE .drawShip: .........
CASE .explode: .........
CASE .endRound: .........
END SELECT
Or:
SELECT CASE fatArray()
CASE 0 TO 50: ..............
CASE 51 TO UBOUND(fatArray): ..........
END SELECT
Would this be cool / useful?