Opened 2 months ago
#79 new defect
@words[] give wrong results if first word is quoted
Reported by: | Anton Monroe | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Functions | Version: | 3.09 |
Keywords: | Cc: |
Description
@word and @words are smart enough to recognize a quoted string as one word, but @words gets seriously confused if the first word is quoted. For instance, it says that
"one" two three four five six
has 5 words. But it is stranger than that. Capitalization changes the word count--
"ONE" two three four five six
has 1 word.
"One" two three four five six
has 3 words.
I can't imagine how that is possible, but it is what I see.
A workaround is to explicitly set the word separator, as in
@words[" ",%string]
@word does not show the problem. It parses the string correctly in all cases.
Attached is a batchfile that should demonstrate it.
I get the same results from 4OS2 versions 3.09 and 3.11.