I before E except after C: Difference between revisions

I before E except after C en BASIC256
(I before E except after C en True BASIC)
(I before E except after C en BASIC256)
Line 929:
I before E when not preceded by C: plausible.
E before I when preceded by C: not plausible.</pre>
 
 
=={{header|BASIC256}}==
{{trans|BASIC}}
<lang freebasic>CI = 0 : XI = 0 : CE = 0 : XE = 0
open 1, "unixdict.txt"
 
do
pal$ = readline (1)
if instr(pal$, "ie") then
if instr(pal$, "cie") then CI += 1 else XI += 1
endif
if instr(pal$, "ei") then
if instr(pal$, "cei") then CE += 1 else XE += 1
endif
until eof(1)
close 1
 
print "CIE: "; CI
print "xIE: "; XI
print "CEI: "; CE
print "xEI: "; XE
print
print "I before E when not preceded by C: ";
if 2 * XI <= CI then print "not ";
print "plausible."
print "E before I when preceded by C: ";
if 2 * CE <= XE then print "not ";
print "plausible."
end</lang>
 
=={{header|BCPL}}==
2,136

edits