SELECT statement examples

select statement with default case label

select x of

case 1

	a = b
	break

case 2

	a = b + c
	break

case 3

	a = b - c
	break

default

	a = b * 2

end_select

It is equivalent to:

if x == 1 then

	// case 1

	a = b

else if x == 2 then

	// case 2

	a = b + c

else if x == 3 then

	// case 3

	a = b - c

else

	// default

	a = b * 2

endif