28.10.2008, 15:21
|
|
Sir Richard Abramson
|
|
Регистрация: 05.04.2008
Сообщения: 5,505
Версия Delphi: XE10
Репутация: выкл
|
|
Код:
function FillArrayFromString(Text:String;Buff:array of Integer):Boolean;
var _pos:Word;
_text:String;
index:word;
BuffPos:Integer;
begin
Result:=False;
_text:=text;
BuffPos:=0;
If _Text[Length(_Text)]<>' ' Then _Text:=_Text+' ';
Index:=0;
While Index<Length(_text) Do
Begin
Inc(Index);
If _text[Index]<>' ' Then Continue;
Try
Buff[BuffPos]:=StrToInt(Copy(_text,1,Index-1));
Delete(_text,1,index);
Index:=0;
Except
Result:=False;
Exit;
End;
Inc(BuffPos);
End;
end;
|