Pascal samples. Static array types.


program Demo;
type
  TMyPoint = record
    X, Y: Single;
  end;
  TMyArray = array [false..true] of TMyPoint;
var
  a: TMyArray;
  b: array['a'..'z'] of Integer;
begin
  b['s'] := 47;
  writeln(b['s']);
  a[true].Y := 5.5;
  writeln(a[true].Y);
end.


Copyright © 2006-2017 Alexander Baranovsky. All rights reserved.