Idx := Pos(' ',S);
Begin SetLength(A,Length(A)+1); A[High(A)] := Copy(S,1,Idx-1); S := Copy(S,Idx+1,Length(S)); Idx := Pos(' ',S); End;