PAGUE 6 MESES
LEVE 12 MESES
GARANTIR DESCONTO

Fórum Problemas com Functions #178852

01/09/2003

0

Olá pessoal!
Estou com o seguite problema em uma função dentro de uma DLL:

function Divide_Nome(Str : string; Parte : integer; var inin:string ; var fimn:string; var meion:string) : string; Export;
var
    lp0, sln, CurrN, lp00, lp01 : integer;
    EmSep, PrimEncontrado : boolean;
begin
    result := ´´;
    fimn:=´´;
    inin:=´´;
    meion:=´´;
    CurrN := 0; 
    EmSep := false; 
    PrimEncontrado := false;
    sln := length(Str);
    for lp0 := 1 to sln do begin
        if Pos(Str[lp0],´ ´) > 0 then
           begin
              if not EmSep then
                 begin
                    if PrimEncontrado then
                       inc(CurrN);
                 end;
                 EmSep := true;
                 if CurrN > Parte then
                    break;
           end
           else
              begin
                 EmSep := false;
                 PrimEncontrado := true;
                 if CurrN = Parte then
                  begin
                    fimn := fimn + Str[lp0];
                  end
                  else if currn <parte-parte+1 then
                       inin:=inin+str[lp0];
              end;
    end;
    lp01:=length(str)-length(fimn)-1;
    for lp00:=length(inin)+2 to lp01 do begin
      meion:=meion+ str[lp00];
      end;

    if (inin=´´) and (fimn<>´´) then begin
        inin:=fimn; fimn:=´´; end
        else if(inin=´´) and (meion<>´´) and (fimn=´´) then begin
                inin:=meion; meion:=´´; end;

end;


Faço a chamada desta function de dentro de um programa e passo os parametro e mando mais 3 variaveis que deveriam receber os valores dentro da function, so que da erro...

alguem pode me ajudar...


Zacca

Zacca

Responder

Posts

01/09/2003

Zacca

Olá pessoal! Estou com o seguite problema em uma função dentro de uma DLL:
function Divide_Nome(Str : string; Parte : integer; var inin:string ; var fimn:string; var meion:string) : string; Export;
var
    lp0, sln, CurrN, lp00, lp01 : integer;
    EmSep, PrimEncontrado : boolean;
begin
    result := ´´;
    fimn:=´´;
    inin:=´´;
    meion:=´´;
    CurrN := 0; 
    EmSep := false; 
    PrimEncontrado := false;
    sln := length(Str);
    for lp0 := 1 to sln do begin
        if Pos(Str[lp0],´ ´) > 0 then
           begin
              if not EmSep then
                 begin
                    if PrimEncontrado then
                       inc(CurrN);
                 end;
                 EmSep := true;
                 if CurrN > Parte then
                    break;
           end
           else
              begin
                 EmSep := false;
                 PrimEncontrado := true;
                 if CurrN = Parte then
                  begin
                    fimn := fimn + Str[lp0];
                  end
                  else if currn <parte-parte+1 then
                       inin:=inin+str[lp0];
              end;
    end;
    lp01:=length(str)-length(fimn)-1;
    for lp00:=length(inin)+2 to lp01 do begin
      meion:=meion+ str[lp00];
      end;

    if (inin=´´) and (fimn<>´´) then begin
        inin:=fimn; fimn:=´´; end
        else if(inin=´´) and (meion<>´´) and (fimn=´´) then begin
                inin:=meion; meion:=´´; end;

end;
Faço a chamada desta function de dentro de um programa e passo os parametro e mando mais 3 variaveis que deveriam receber os valores dentro da function, so que da erro... alguem pode me ajudar...



Responder

Gostei + 0

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

Aceitar