* check -1**4 for both vars and constants

This commit is contained in:
pierre 2002-10-29 11:33:21 +00:00
parent d0898ec220
commit abbb7ed41c

View File

@ -1,7 +1,7 @@
program prueba;
uses crt;
var
resultado,exponente:integer;
i,resultado,exponente:integer;
begin
exponente := 3;
resultado := -1 ** exponente;
@ -17,6 +17,11 @@ begin
writeln (resultado);
if resultado<>1 then
Halt(1);
i:=1;
resultado := - i ** exponente;
writeln (resultado);
if resultado<>-1 then
Halt(1);
resultado := -1 ** exponente;
writeln (resultado);
if resultado<>-1 then