function IsStrSim(S : String; i, j : Integer) : Boolean; begin Result := S[i] = S[j]; If j-i > 1 Then Result := Result And IsStrSim(S,i+1,j-1); end;