Letter frequency: Difference between revisions
Content added Content deleted
(→{{header|Julia}}: More compact and idiomatic code) |
No edit summary |
||
Line 3,894: | Line 3,894: | ||
Example output of count.xpl counting itself: |
Example output of count.xpl counting itself: |
||
[[File:Count2XPL0.gif]] |
[[File:Count2XPL0.gif]] |
||
=={{header|Yabasic}}== |
|||
<lang Yabasic>dim ascCodes(255) |
|||
f = open("unixdict.txt", "r") |
|||
if f then |
|||
while(not eof(#f)) |
|||
line input #f a$ |
|||
for i = 1 to len(a$) |
|||
c = asc(mid$(a$, i, 1)) |
|||
ascCodes(c) = ascCodes(c) + 1 |
|||
next |
|||
wend |
|||
for i = 1 to 255 |
|||
c = ascCodes(i) |
|||
if c print chr$(i), " = ", c |
|||
next |
|||
close #f |
|||
end if</lang> |
|||
=={{header|zkl}}== |
=={{header|zkl}}== |