TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: TIM HUTZLER
from: KURT KUZBA
date: 1996-09-29 05:21:00
subject: Word Wrapping

TH>   Well, the wordwrap sub is only about 20 lines of code.
TH>   I want it to wrap a block right of quote markers,
TH>   like the kind you see in FIDOmail. "MV>"
th>.............
   There is a whole lot more to it yet, then.
I have a working version in a QB45 program I am doing.
LLED.BAS, Linked List EDitor.
It supports 2,000+ lines in the ide and 5,000+ when compiled.
It also supports up to ten documents open at once.
You have to account for wrapping when you are at the end of the
line and when you are in the middle of the line or at the start
of the line. You also have to decide where the cursor will be
after the wrap, which column of which line. Will auto-indenting
be supported? Will you need to add a new line, or will the
wrapped text be appended to the following line when you add
text from within the body of the line instead of to the end?
As to the quote prefix, it is best to strip the prefix and
remember it, then format the text to a usable size, which must
be influenced by the size of the quote prefix, naturally, and
then go through and attach the prefix to the text. This
prevents the ugly wrapping and dropped characters commonly
associated with QWK readers dealing with lines of excessive
length. I am surprised this is not commonly done, until I
recall that when one gets that far along in a project, one
tends to grow short of patience for such things, generally
finding that 'they' can darned well learn to do things
reasonably instead of expecting the programmer to take their
own code apart and rewrite portions of it to accommodate the
sloppy messaging habits of the inconsiderate.
However you write it, there will be instances where somebody's
quotes will mess it up, especially the ones using high ASCII
boxes or underlines.
___
> ] If they could reason there would be no argument.............
--- Maximus/2 3.01
1:278/216)
---------------
* Origin: The Programmer's Mark * Brooklyn, NY, USA: 718-921-9267

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.