RosettaCodeData/Task/Letter-frequency/Yabasic/letter-frequency.basic
2023-07-01 13:44:08 -04:00

18 lines
348 B
Text

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