I before E except after C: Difference between revisions
Content deleted Content added
m →{{header|REXX}}: removed some dead code. -- ~~~~ |
m →{{header|REXX}}: handled the case if word starting with subject string simplier. -- ~~~~ |
||
Line 80: | Line 80: | ||
ei=pos('EI',u); ie=pos('IE',u) /*see if EI or IE is in this word*/ |
ei=pos('EI',u); ie=pos('IE',u) /*see if EI or IE is in this word*/ |
||
if ie\==0 & ei\==0 then #.eiie=#.eiie+1 /*word contains both IE & EI*/ |
if ie\==0 & ei\==0 then #.eiie=#.eiie+1 /*word contains both IE & EI*/ |
||
⚫ | |||
⚫ | |||
if ie\==0 then do; if ie==1 then ie=999 /*word starts with: IExxx */ |
|||
if ei\==0 then if substr(u,ei-1+(ei==1)*999, 1)=='C' then #.eic=#.eic+1 |
|||
else #. |
else #.eix=#.eix+1 |
||
end |
|||
if ei\==0 then do; if ei==1 then ei=999 /*word starts with: EIxxx */ |
|||
⚫ | |||
⚫ | |||
end |
|||
end /*r*/ |
end /*r*/ |
||