Wordiff: Difference between revisions
Content added Content deleted
(→{{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: | Line 430: | ||
xu= x; upper xu /*obtain an uppercase version of word. */ |
xu= x; upper xu /*obtain an uppercase version of word. */ |
||
if \@.xu then call over " doesn't exist in the dictionary: " iFID |
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 \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." |
if w==L then if \verE() then call over " isn't a legal letter substitution." |
||
Line 469: | Line 470: | ||
@.= 0; starters= 0 |
@.= 0; starters= 0 |
||
do r=1 while lines(iFID)\==0 /*read each word in the file (word=X).*/ |
do r=1 while lines(iFID)\==0 /*read each word in the file (word=X).*/ |
||
x= strip(linein(iFID)) |
x= strip(linein(iFID)) /*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. */ |
@.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. */ |
if L<3 | L>4 then iterate /*only use short words for the start. */ |