unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
const
n=30;
type
Tstringarray= array[1..n] of string;
var
TheStrings: TStringArray;
{$R *.dfm}
procedure load(var TheStrings: TStringArray);
var
i:integer;
begin
TheStrings[1] := 'First string in this Array';
TheStrings[2] := 'the Second Array string';
TheStrings[3] := 'String number three of this Array';
TheStrings[4] := 'this is the fourth String';
TheStrings[5] := 'First string in this Array';
TheStrings[6] := 'the Second Array string';
TheStrings[7] := 'String number three of this Array';
TheStrings[8] := 'this is the fourth String';
TheStrings[9] := 'First string in this Array';
TheStrings[10] := 'the Second Array string';
TheStrings[11] := 'String number three of this Array';
TheStrings[12] := 'this is the fourth String';
TheStrings[13] := 'First string in this Array';
TheStrings[14] := 'the Second Array string';
TheStrings[15] := 'String number three of this Array';
TheStrings[16] := 'this is the fourth String';
TheStrings[17] := 'First string in this Array';
TheStrings[18] := 'the Second Array string';
TheStrings[19] := 'String number three of this Array';
TheStrings[20] := 'this is the fourth String';
TheStrings[21] := 'the Second Array string';
TheStrings[22] := 'String number three of this Array';
TheStrings[23] := 'this is the fourth String';
TheStrings[24] := 'First string in this Array';
TheStrings[25] := 'the Second Array string';
TheStrings[26] := 'String number three of this Array';
TheStrings[27] := 'this is the fourth String';
TheStrings[28] := 'First string in this Array';
TheStrings[29] := 'the Second Array string';
TheStrings[30] := 'String number three of this Array';
for i:=1 to n do
begin
showmessage(TheStrings[i]);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
TheStrings: TStringArray;
begin
load(TheStrings);
end;
end.