Letter frequency: Difference between revisions
m
→{{header|S-BASIC}}
Line 5,841:
=={{header|S-BASIC}}==
Because S-BASIC lacks an EOF function, some extra care is required to avoid reading beyond the end of file. (CP/M text files are
<lang S-BASIC>
$constant EOF = 1AH rem
rem Convert character to upper case
Line 5,858:
next p
end = source
comment
Line 5,894 ⟶ 5,891:
if ch >= "A" and ch <= "Z" then
begin
freq
total = total + 1
end
input3 #2; ch
end
goto 8_done rem Jump around error trap
|