Word wrap: Difference between revisions

Content added Content deleted
m (→‎version 1: corrected some misspellings in the LAWS.TXT file. -- ~~~~)
(→‎version 2: use lastpos bif)
Line 1,891:
<lang rexx>/* REXX ***************************************************************
* 20.08.2013 Walter Pachl "my way"
* 23.08.2013 Walter Pachl changed to use lastpos bif
**********************************************************************/
Parse Arg w
Line 1,904 ⟶ 1,905:
s=s' '
Do While length(s)>w
Do i=lastpos(' ',s,w+1) to/* 1instead byof -1loop */
If substr(s,i,1)='' Then Leave
End
If i=0 Then
p=pos(' ',s)