Irfan Fazel wrote:
writeln(-2 pow 0); (* should be 1 *)
writeln(-2 pow 1);
writeln(-2 pow 2); writeln; (* should be 1 *)
Problem of relative priority between - and pow.
writeln(-2 pow 0,' ',(-2) pow 0);
gives
-1 1
IIRC priority of pow should be greater than binary - but smaller than unary - This would give the behaviour that everybody expects.
Maurice