mita icon indicating copy to clipboard operation
mita copied to clipboard

Strings can be compared, but wrong code is produced

Open wegendt-bosch opened this issue 6 years ago • 0 comments

The following is legal Mita:

package bar;
import platforms.xdk110; 


every 100 milliseconds {
	var x = "asdf";
	if(x == "asdf") {
		/*...*/
	}
}

The produced code doesn't work though:

	char x[5];
	const char* _xInit = "asdf";
	strcpy(x, _xInit);
	
	if(x == "asdf")
	{
	}

wegendt-bosch avatar Apr 25 '18 14:04 wegendt-bosch