PAGUE 6 MESES
LEVE 12 MESES
GARANTIR DESCONTO

Fórum Identifier Redeclared: Frm_ConfirmaVenda #534097

09/10/2015

0

Tenho a seguinte procedure:

procedure Frm_ConfirmaVenda.VinculadoResult();
var
    ArqVinc2:TextFile;
    Res,Res2, dadosmemo, codbarras, produto, dataprox:string;
    DadosVinc:TStringList;
    VinculadoParte: Integer;
begin

    DadosVinc := TStringList.Create();

    Assignfile(ArqVinc2,gsAppPath+'\Vinculados\' + inttostr(seqvinculado) + '.TXT');
    reset(ArqVinc2);
    while not Eof(ArqVinc2) do
    begin
        Readln(ArqVinc2,Res);
        DadosVinc.Add(Res);
    end;
    Closefile(ArqVinc2);

    i :=  pos('PROX.COM',DadosVinc.Text)+52;
    Res2 := copy(DadosVinc.Text,i,1000000000);

    DadosVinc.Free;

    Randomize;
    VinculadoParte:=Random(9999999);

    if FileExists(gsAppPath+'\Vinculados\'+inttostr(VinculadoParte)+'_result.TXT') then
        Randomize;

        Assignfile(ArqVinc2,gsAppPath+'\Vinculados\'+inttostr(VinculadoParte)+'_result.TXT');
        rewrite(ArqVinc2);
        Writeln(ArqVinc2,Res2);
        Reset(ArqVinc2);

    Memoria.Open;

    while (not Eof(ArqVinc2)) do
    begin
        readln(ArqVinc2,Res);
        codbarras := Copy(Res,1,13);
        produto := trim(Copy(Res,14,50));
        if codbarras = 'Disque Denunc' then
        Exit;
          Readln(ArqVinc2,Res);
          dataprox := Copy(Res,33,8);
          Memoria.Insert;
          Memoria.FieldByName('CODBARRAS').Value := codbarras;
          Memoria.FieldByName('PRODUTO').Value := produto;
          Memoria.FieldByName('DATAPROX').Value := dataprox;
          Memoria.Post;
    end;
    Closefile(ArqVinc2);
    DeleteFile(ExtractFilePath(Application.ExeName) + 'VINCULADO_PARTE.TXT');
end;


Declarei a mesma procedure em

type
  TFrm_ConfirmaVenda = class(TForm)

    Image1: TImage;
    Image2: TImage;
    Label1: TLabel;
    .
    .
    .
    Memoria: TClientDataSet;
    MemoriaCODBARRAS: TStringField;
    MemoriaPRODUTO: TStringField;
    MemoriaDATAPROX: TStringField;
    procedure VinculadoResult();


Quando eu vou compilar, me aparece esses erros:

Identifier Redeclared: Frm_ConfirmaVenda apontando o erro para
procedure Frm_ConfirmaVenda.VinculadoResult();

Undeclared Identifier: Memoria e este segundo foi declarado, como pode ser visto acim

Alguem pode me ajudar, e me dizer o que eu estou errando???
Pg Me

Pg Me

Responder

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar