function IsAOrB(const p_Id: string): boolean;
begin
  if ((p_Id = 'A') or (p_Id = 'B')) then begin
    Result := true;
    Exit;
  end;
  Result := false;
end;

Result := ((p_Id = 'A') or (p_Id = 'B'));

That would have been enough. But this also features Exit and an asymmetrical if.

By Anonymous, 2017-12-12 15:42:14