Ver Mensaje Individual
  #1  
Antiguo 26-05-2004
Julià T. Julià T. is offline
Miembro
 
Registrado: may 2003
Ubicación: en el teclado
Posts: 314
Reputación: 24
Julià T. Va por buen camino
Código Delphi [-]
  
  //creo que realmente la funcion en delphi seria como la siguiente
  function comparaCadenas(c1, c2: string): integer;
  begin
   result:=integer(C1<>c2);
  end;
  
    // Equivalente de StrCmp en  Delphi
  function comparaCadenas(c1, c2: PChar): integer;
  begin
    if (c1  = nil) or (c2 = nil) then
      result := Integer(c2) - Integer(c1)
    else  begin
      while (c1^ <> #0) and (c2^ <> #0) and (c1^ = c2^) do  begin
        Inc(c1);
        Inc(c2);
      end;
      if (c1^ <>  #0) or (c2^ <> #0) then
        result := Integer(c1^) -  Integer(c2^)
      else
        result := 0;
    end;
  end;

Última edición por santana fecha: 26-05-2004 a las 02:04:43. Razón: Cerrar correctamente etiqueta [/delphi]
Responder Con Cita