17 lines
482 B
Plaintext
17 lines
482 B
Plaintext
open "c:\rbp101\public\textFile.txt" for input as #f
|
|
textData$ = input$(#f, lof( #f))
|
|
ln =len(textData$)
|
|
close #f
|
|
|
|
dim charCount( 255)
|
|
|
|
for i =1 to ln
|
|
char = asc(mid$(textData$,i,1))
|
|
charCount(char) = charCount(char) + 1
|
|
if char > 31 then totCount = totCount + 1
|
|
next i
|
|
|
|
for i = 32 to 255
|
|
if charCount(i) > 0 then print "Ascii:";using("###",i);" char:";chr$(i);" Count:";using("#######",charCount(i));" ";using("##.#",(charCount(i) / totCount) * 100);"%"
|
|
next i
|