有哪位朋友知道这个程序错在那里
在freepascal 下虽能通过,但是运行结果一直不正确!
这个程序是为了验证一窜字符是不是回文数(例如:asd-dsa)program mw(input,output);
  var ch:char;  function pp:boolean;
    var bl:boolean;ch1,ch2:char;    begin
      read(ch1);
      if ch1='-'
        then bl:=true
        else if pp
              then begin
                     read(ch2);
                     if ch1<>ch2
                       then bl:=false
                       else bl:=true
                   end
              else bl:=false;
      pp:=bl
    end;  begin
    writeln('input string:');
    if pp then begin read(ch);
    if ord(ch)=13 then begin writeln;writeln('it is symmetry') end
                  else begin writeln;writeln('it is not symmetry') end
               end
          else
      begin writeln;writeln('it is not symmestry.') end;
  end.