fpc/bugs/bug0247.pp
1999-05-02 00:11:10 +00:00

22 lines
406 B
ObjectPascal

{$mode delphi}
var
x : integer = 34;
{ this is the way Delphi creates initialized vars
++ its much more logical then BP
typed const !!
-- its incompatible with BP !! (PM) }
y : array[0..2] of real = (0.0,1.23,2.56);
{ these are true const in Delphi mode and thus
it should not be possible to change ! }
const
z : real = 45.2;
begin
y[2]:=z;
{ this should be refused ! }
z:=y[1];
end.