Newer
Older
zweic / tests / 5 / antoineyersion / if_then_else(3).zwei
@glproj03 glproj03 on 6 Feb 2006 680 bytes compiler working!
//#isut
// test generation of the if/then/else expression and good evaluation of boolean 
// NEED ALSO A MINIMAL IMPLEMENTATION OF GENCOND (part 7)

{
	if(true) {
		printInt(1);
		printChar(10);
		printChar(13);
	};	
	if(true){
		printInt(1);
		printChar(10);
		printChar(13);
	}
	else {
		printInt(0);
		printChar(10);
		printChar(13);
	};
	if(false) {
		printInt(0);
		printChar(10);
		printChar(13);
	}
	else {
		printInt(1);
		printChar(10);
		printChar(13);
	};
	if(true) {
		if(false) {
			printInt(0);
			printChar(10);
			printChar(13);
		}
		else {
			printInt(1);
			printChar(10);
			printChar(13);
		};
	}
	else {
		printInt(0);
		printChar(10);
		printChar(13);
	};
}