<pre>function wdt3 T,N  put the length of T into L  if  L < N then put T into R  else    repeat with P = N down to 1      if char P of T is in " ,)" then exit repeat    end repeat    put wdt(char 1 to P of T,N) & return into R    put wdt(char P+1 to L of T,N) after R  end if  return Rend wdt3</pre>