Word wrap: Difference between revisions

Content added Content deleted
(→‎version 0: fixed showing an extra blank before 1st line of text. -- ~~~~)
m (→‎version 1: used a shortcut for the 1st word. -- ~~~~)
Line 1,530: Line 1,530:
if j==0 then call err 'file' iFID "not found."
if j==0 then call err 'file' iFID "not found."
if @='' then call err 'file' iFID "is empty."
if @='' then call err 'file' iFID "is empty."
$=word(@,1)
$=
do k=1 for words(@); x=word(@,k) /*parse until text (@) exhausted.*/
do k=2 for words(@)-1; x=word(@,k) /*parse until text (@) exhausted.*/
_=$ x /*append it to the money and see.*/
_=$ x /*append it to the money and see.*/
if length(_)>width then call tell /*word(s) exceeded the width? */
if length(_)>width then call tell /*word(s) exceeded the width? */