Newer
Older
zweic / tests / 5 / cmp.zwei
@glproj03 glproj03 on 6 Feb 2006 1 KB compiler working!
//a savoir: 
//les && précèdent les ||
//donc '1 || 0 && 0' évalue à 1.

//#startut
{
	Int i = 0;

	//1
	if(i == 0) {printInt(1);};

	//2
	if(i >= 0) {printInt(2);};

	//3
	if(i >= 0) {printInt(3);};

	//4
	if(i != 0) {}
	else {printInt(4);};




	//\n
	printChar(10);
	i = 1;

	//1
	if(i == 1) {printInt(1);};

	//2
	if(i > 0) {printInt(2);};

	//3
	if(i < 2) {printInt(3);};

	//4
	if(i != 7) {printInt(4);};




	//\n
	printChar(10);
	i = -1;

	//1
	if(i == -1) {printInt(1);};

	//2
	if(i < 0) {printInt(2);};

	//3
	if(i > -2) {printInt(3);};

	//4
	if(i != 12) {printInt(4);};





	//\n
	printChar(10);

	//1
	if(1 && 1) {printInt(1);};

	//2
	if(1 && -1) {printInt(2);};

	//3
	if(0 || 4) {printInt(3);};

	//4
	if(-2 || 0) {printInt(4);};

	//5
	if(-1 || 1) {printInt(5);};




	//\n
	printChar(10);

	//66
	if(0 || (1 && 0)) {} else {printInt(6);};
	if(0 || 1 && 0) {} else {printInt(6);};

	//77
	if(0 || (1 && 1)) {printInt(7);};
	if(0 || 1 && 1) {printInt(7);};

	//891
	if(1 || (0 && 0)) {printInt(8);};
	if(1 || 0 && 0) {printInt(9);};
	if(0 && 0 || 1) {printInt(1);};
}