tb0209.pp 534 B

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