Fortes Report no Delphi 2006
06/12/2010
0
[Pascal Error] RLUtils.pas(910): E2003 Undeclared identifier: 'CharInSet'
[Pascal Error] RLUtils.pas(910): E2015 Operator not applicable to this operand type
E olhando essa unit(RLUtils.pas) verifiquei o seguinte trecho, lá no começo:
{$IFDEF DELPHI7}
//Esta funções existem a partir do Delphi 2009 e foram recriadas para evitar warnings
function CharInSet(C: AnsiChar; const CharSet: TSysCharSet): Boolean; overload;
function CharInSet(C: WideChar; const CharSet: TSysCharSet): Boolean; overload;
{$ENDIF}
e aqui onde é chamada esta função que dá o erro:
function IterateJustification(var AText: string; var AIndex: Integer): Boolean;
function FindSpc: Boolean;
const
SPC = [#32, #9, #13, #10];
begin
Result := False;
while (AIndex > 0) and CharInSet(AText[AIndex], SPC) do
Dec(AIndex);
while AIndex > 0 do
if CharInSet(AText[AIndex], SPC) then
begin
while (AIndex > 0) and CharInSet(AText[AIndex], SPC) do
Dec(AIndex);
if AIndex > 0 then
begin
Insert(#32, AText, AIndex + 1);
Result := True;
end;
Break;
end
else
Dec(AIndex);
end;
begin
Result := FindSpc;
if not Result then
begin
AIndex := Length(AText);
Result := FindSpc;
end;
end;
Alguém tem alguma ideia?
Leandro Carvalho
Posts
07/12/2010
Leonardo Xavier
17/03/2011
Edgar Brasil
//Esta funções existem a partir do Delphi 2009 e foram recriadas para evitar warnings
function CharInSet(C: AnsiChar; const CharSet: TSysCharSet): Boolean; overload;
function CharInSet(C: WideChar; const CharSet: TSysCharSet): Boolean; overload;
{$ENDIF}
Não sei se ainda precisa da solução,
Mas para Delphi 7 é so adicionar DELPHI7 no campo Conditional Defines na aba Directories/Conditionals das opções do projeto.
Este bloco só é compilado se estiver setado DELPHI7 nas opções do projeto.
Não testei em outra versão do Delphi.
Abraços.
Clique aqui para fazer login e interagir na Comunidade :)