Switch not working

This is my code but it is not working:

1
2
3
4
5
6
7
8
9
10
11
12
       switch( number )
       {
            case < num2:
                //code
                break;
            case > num2:
                //code
                break;
            case == num2:
                //code
                break;
        }
Hi,

A switch doesn't work like that , you need an if-else-if-else instead.

Have a look in the reference, tutorials etc sections at the top left of this page.

Cheers :+)
Topic archived. No new replies allowed.