const s='word-1 word--2 word---3 word-4 word--5'; function longest(s: string): string; var n: word; a,b,c: string; BEGIN c:=s; n:=pos(' ',c); a:=copy(c,1,n-1); delete(c,1,n); while length(c)>0 do begin n:=pos(' ',c); if n>0 then begin b:=copy(c,1,n-1); delete(c,1,n); end else begin b:=c; c:=''; end; if (length(a)