According to the help file
. . .
function ExtractWordPos(
N: Integer;
const S: string;
const WordDelims: TSysCharSet;
out Pos: Integer
):string;
N Which word to extract
S String to extract a word from.
WordDelims Characters to use as word delimiters
Pos On return, contains the position of the N-th word.
. . .
But if I make the deliminator more than one character I get an error.
So, just one space as deliminator.
program pos;
uses strutils;
Var
Answer : String;
aPos : Integer;
Item : String = 'Now is the time for all good men';
begin
Answer := ExtractWordPos(4,Item,[' '] , aPos);
writeln(answer,' ',apos);
writeln('Press return to end . . .');
readln;
end.
result
time 12
Press return to end . . .