设计一个计算文件F中每个字符出现次数频率的程序
   我是新手,自己写了下错误很多,希望高手指点。帮帮重新写个也好啊!
   先谢谢了!
  
proram pinlv(output);
var
   f:text;
   count:array[' '..'~'] of integer;
   letter:set of' '..'~';
   ch:char;
begin
   letter:=[' '..'~'];
   for ch:=' 'to'~' do
       count(ch):=0;
       reset(f);
   while not eof(f) do
   begin
      while not eof(f) do
      begin
         read(f,ch);
         if ch in letter then
            count(ch):=count(ch)+1
            end;
      readin;
      end;
      for ch:=' 'to'~' do
          writeln(count(ch))
          end.