bug0247.pp 406 B

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