Important update: Arm Announces End of Life Timeline for Mbed. This site will be archived in July 2026. Read the full announcement.
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:
...
}
}