[ooc-compiler] Type of 'SHORT (ENTIER (1.0))'?
Brought to you by:
mva
|
From: Frank H. <hr...@te...> - 2009-01-10 21:22:47
|
In the following small program
MODULE Test;
VAR n: INTEGER;
x: REAL;
BEGIN
x:= 1.0;
n:= SHORT (ENTIER (x));
n:= SHORT (ENTIER (1.0))
END Test.
I get the compiler error
"Test.Mod:7:4: Expression not compatible with variable type `INTEGER'".
So the second line starting 'n:= ...' is wrong, but not the first one.
Why?
--
Frank Hrebabetzky +55 / 48 / 3235 1106
Florianopolis, Brazil
|