// This program tests the short-circuit && operation. // The correct output is: // 3 // 3 // 4 // 3 // 4 // 987 class Tester extends Object { nat print4return4(nat unused) { printNat(4); 4; } } main { var Tester test; test = new Tester; if(0&&0) then {printNat(987);} else {printNat(3);}; if(0 && test.print4return4(0)) then {printNat(987);} else {printNat(3);}; if(test.print4return4(0) && 0) then {printNat(987);} else {printNat(3);}; if(1 && test.print4return4(0)) then {printNat(987);} else {printNat(3);}; }