В чем ошибка???
function getmail(st:string) : string;
var
numst : integer;
numbegin : integer;
numend : integer;
getmails : string;
getmailsn : integer;
begin
if Pos('@',st) > 0 then
begin
numst := Pos('@',st);
while st[numst] <> ' ' do
begin
dec(numst);
end;
numbegin := numst;
numst := Pos('@',st);
while st[numst] <> ' ' do
begin
inc(numst);
end;
numend := numst;
getmailsn := 0;
for numst := numbegin to numend do
begin
showmessage(inttostr(numst));
getmails[getmailsn] := st[numst];
inc(getmailsn);
end;
getmail := getmails;
end;
****
Вылетает на getmails[getmailsn] := st[numst];
|