用户指南第6.1.5章单词块单词是由空格,制表符或返回字符或用双引号括起来的字符串。是否可以有额外的单词分隔符?如何设置单词分隔符?
我从“用户指南”一章6.5.1'何时使用数组'中获取以下代码片段, 184
on mouseUp
--cycle through each word adding each instance to an array
repeat for each word tWord in field "sample text"
add 1 to tWordCount[tWord]
end repeat
-- combine the array into text
combine tWordCount using return and comma
answer tWordCount
end mouseUp
它计数字段“示例文本”中每个单词形式的出现次数。
我意识到完全停止后单词被计为单词的一部分与默认设置。
如何更改句点(和,或逗号)被认为是单词边界的设置?
这也是一个有趣的解决方案。我不知道哪一个更快。 –