I found out that in Lite-C, a switch...case without break doesn't behave like in standard C/C++. You can see that in this example:

Code:
#include <acknex.h>

var x;
void main ()
{
	while (1)
	{
		x = 0;
		switch(key_lastpressed)
		{
			case 16: // q
			x += 1;
			case 17: // w
			x +=10;
			case 18: case 19: // e or r
			x+=100;
			break;
		}
		wait(1);
	}
}

PANEL* debug_pan =
{
	digits(10,10,"%f",*,1,x);
	flags = SHOW;
}



In standard C/C++, the code shouldn't be stopped being executed if there is no break, but a new case. This means, when you press Q, x should be 111, but it's 1! It seems that Lite-C stops at the next case. But the E and R key behave the same, so it seems that it doesn't stop if there is no code inbetween. If this is some kind of "noob-protection", in case the user forgot a break; please make a define or something to turn it off.

Also, an empty switch...case, like this
Code:
switch(something)
{

}


returns a syntax error. It also returns a syntax error if there is only a default case. It would be nice if the compiler didn't give an error, because sometimes it can be useful to comment out some cases for debugging and it's just annoying if you comment out the last not commented case and you get an error and have to comment out the whole switch.


This happens with 7.85 and 8.00.6.