Hammering on about Paragraphs

J. Landman Gay jacque at hyperactivesw.com
Sat Dec 20 13:08:11 EST 2008


Richmond Mathewson wrote:

> What I did point out was that in Southern Illinois (even if nowhere else)
> there was a rather narrow definition of what constitutes good English.

Easily resolved by looking at some American-printed books on Amazon, for 
example. I'm surprised this professor was so uninformed.

> Are we to detect paragraph breaks merely on the basis of TabKeyDowns
> or something else. Certainly TABS will only detect the indented type
> of paragraph.

In Revolution, paragraphs are equivalent to "lines". Just get the number 
of lines in a field and you will have the number of paragraphs. In the 
case where there are empty lines between paragraphs, you can filter the 
content "without empty" and then get the number of lines of the filtered 
  content, if that's what you need.

In rare cases, such as when importing certain text documents, there may 
be a return character at the end of every visible line; these are "hard 
wrapped" lines that don't represent true paragraphs. If the text has 
empty lines between actual, visual paragraphs, you can do some fairly 
simple replacements to remove the hard line endings. If the text does 
not have empty lines between visual paragraphs, it's a bigger challenge. 
I've written a best-guess algorithm to deal with that situation for one 
of my stacks. It isn't perfect.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list