[comp.sys.mac.hypercard] Counting Words

lac@ecs.soton.ac.uk (Les Carr) (02/14/90)

Playing around with a set of scripts (in HC 1.2.5) to provide a `query'
function (find every occurence of word1,word2..wordn coexisting
within N words of each other), i spent an hour or so trying to find
out why my darn scripts would include about twice as many words as
expected in the N-word context (ie I would request a span of 20 words
and end up with 50). Eventually I discovered that HyperCard treats
everything within a pair of double-quotes as one word. Failing that,
it will treat everything from a double-quote to the end of a line as
one word. This is only the case for straight double-quotes, not single
quotes or option-quotes.
	Is this documented anywhere? Are there any other pitfalls that
I should watch out for in HC's definition of a word/item/line?
-- 
L.Carr@ecs.soton.ac.uk               Les Carr
Tel: +44 703 593649                  Dept of Electronics and Computer Science
Fax: +44 703 593045                  University of Southampton
Telex: 47661 SOTONU G                Southampton  SO9 5NH  England