Newer
Older
zweic / tests / 5 / antoineyersion / functions_call(8).zwei
@glproj03 glproj03 on 6 Feb 2006 388 bytes compiler working!
//#isut
// test method call without inheritance

class A{
	Int a;
	Int b;
	Null foo(Int c){
		printInt(c);
		printChar(32);
	}
	Int foo2(Int d, Int e){
		Int acc = e;
		while(d > 0){
			printInt(d);
			printChar(58);
			printChar(32);
			printInt(acc/e);
			printChar(32);
			d = d-1;
			acc = acc+e;
		}
		return acc
	}
}



{
	Null k = new A(1, 2).foo(1);
	new A(3, 4).foo2(5, 6);	
}