Index:=1;
for i:=0 to ComponentCount-1 do
if (Index=n) then
exit
else if Components[i].ClassType=TEdit then
begin
A[Index]:=(Components[i] as TEdit).Text;
Index:=Index+1;
end;
var
s: Array of string;
j: integer;
begin
SetLength(s, 50);
j :=0;
For i:=0 To ControlsCount-1 Do
IF Controls[1] IS TEdit Then
Begin
j := j+1;
if j>50 then exit;
s[j] := Controls[i].text;
End;