Text wrapping
Author |
Message |
Mayb123
|
Posted: Wed Dec 19, 2007 1:08 pm Post subject: Text wrapping |
|
|
Hey everyone. does anyone know how to keep long pieces of text from clipping at the right side of the run window and to continue on the next line? |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Tony

|
Posted: Wed Dec 19, 2007 1:17 pm Post subject: RE:Text wrapping |
|
|
Print text one word at a time, check to see if there's enough space left on the line (maxcol - text printed so far) for the next word to fit. Otherwise linebreak with \n (or put "") and continue. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
richcash
|
Posted: Wed Dec 19, 2007 1:24 pm Post subject: Re: Text wrapping |
|
|
You'll probably also need the length function which returns the length of a string. |
|
|
|
|
 |
|
|