mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-21 10:10:19 +02:00
* check -1**4 for both vars and constants
This commit is contained in:
parent
d0898ec220
commit
abbb7ed41c
@ -1,7 +1,7 @@
|
|||||||
program prueba;
|
program prueba;
|
||||||
uses crt;
|
uses crt;
|
||||||
var
|
var
|
||||||
resultado,exponente:integer;
|
i,resultado,exponente:integer;
|
||||||
begin
|
begin
|
||||||
exponente := 3;
|
exponente := 3;
|
||||||
resultado := -1 ** exponente;
|
resultado := -1 ** exponente;
|
||||||
@ -17,6 +17,11 @@ begin
|
|||||||
writeln (resultado);
|
writeln (resultado);
|
||||||
if resultado<>1 then
|
if resultado<>1 then
|
||||||
Halt(1);
|
Halt(1);
|
||||||
|
i:=1;
|
||||||
|
resultado := - i ** exponente;
|
||||||
|
writeln (resultado);
|
||||||
|
if resultado<>-1 then
|
||||||
|
Halt(1);
|
||||||
resultado := -1 ** exponente;
|
resultado := -1 ** exponente;
|
||||||
writeln (resultado);
|
writeln (resultado);
|
||||||
if resultado<>-1 then
|
if resultado<>-1 then
|
||||||
|
Loading…
Reference in New Issue
Block a user