mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 07:08:29 +02:00

- fix for-in loop for string const array - add some test from Alexander S. Klenin (issue #0014990) git-svn-id: trunk@14041 -
25 lines
285 B
ObjectPascal
25 lines
285 B
ObjectPascal
{mode objfpc}
|
|
{$apptype console}
|
|
type
|
|
T = array [1..3] of Integer;
|
|
|
|
|
|
procedure P(a: array of T);
|
|
var
|
|
r: T;
|
|
i: Integer;
|
|
begin
|
|
for r in a do
|
|
begin
|
|
for i in r do Write(i, ' ');
|
|
Writeln;
|
|
end;
|
|
end;
|
|
|
|
const
|
|
r1: T = (1,2,9);
|
|
r2: T = (3,4,5);
|
|
begin
|
|
P([r1, r2]);
|
|
end.
|