Procedure split(str: string; list: tstrings);
begin
while pos(' ', str) > 0 do
begin
list.add(copy(str, 1, pos(' ',str)-1));
delete(str, 1, pos(' ',str));
end;
list.add(str);
end;
...
split('yes sir!', listbox1.items);
...
Jeppe Johansen
Jeppesoftware@hotmail.com