I before E except after C: Difference between revisions
Content added Content deleted
(I before E except after C en QBasic) |
(I before E except after C en True BASIC) |
||
Line 4,071: | Line 4,071: | ||
E before I when preceded by C is not plausable |
E before I when preceded by C is not plausable |
||
I before E except after C is not plausible</pre> |
I before E except after C is not plausible</pre> |
||
=={{header|True BASIC}}== |
|||
{{trans|BASIC}} |
|||
<lang qbasic>DEF EOF(f) |
|||
IF END #f THEN LET EOF = -1 ELSE LET EOF = 0 |
|||
END DEF |
|||
CLEAR |
|||
OPEN #1: NAME "UNIXDICT.TXT", org text, ACCESS INPUT, create old |
|||
DO |
|||
LINE INPUT #1: w$ |
|||
IF POS(w$,"ie")<>0 THEN |
|||
IF POS(w$,"cie")<>0 THEN LET ci = ci+1 ELSE LET xi = xi+1 |
|||
END IF |
|||
IF POS(w$,"ei")<>0 THEN |
|||
IF POS(w$,"cei")<>0 THEN LET ce = ce+1 ELSE LET xe = xe+1 |
|||
END IF |
|||
LOOP WHILE (NOT EOF(1)<>0) |
|||
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|Tcl}}== |
=={{header|Tcl}}== |