Wordiff: Difference between revisions

m
→‎{{header|REXX}}: changed REXX program to restrict words to at least three characters.
(→‎{{header|Wren}}: Words under 3 letters no longer valid following change in task description.)
m (→‎{{header|REXX}}: changed REXX program to restrict words to at least three characters.)
Line 430:
xu= x; upper xu /*obtain an uppercase version of word. */
if \@.xu then call over " doesn't exist in the dictionary: " iFID
if length(x) <3 then call over " must be at least three letters long."
if w <L then if \verL() then call over " isn't a legal letter deletion."
if w==L then if \verE() then call over " isn't a legal letter substitution."
Line 469 ⟶ 470:
@.= 0; starters= 0
do r=1 while lines(iFID)\==0 /*read each word in the file (word=X).*/
x= strip(linein(iFID)); y=x; upper x /*pick off a word from the input line. */
if \isMix(x) then iterate /*Not a suitable word for WORDIFF? Skip*/
y= x; upper x /*pick off a word from the input line. */
@.x= 1; L= length(x) /*set a semaphore for uppercased word. */
if L<3 | L>4 then iterate /*only use short words for the start. */