Compiler Error 847

bad code

void function(void)
{
float f = 0;
...
switch(f) {
case 0:
...
break;
default:
...
}
}

You can't use a switch on a float variable.

good code

void function(void)
{
int f = 0;
...
switch(f) {
case 0:
...
break;
default:
...
}
}

All wikipages