Ver Mensaje Individual
  #2  
Antiguo 03-11-2021
Avatar de movorack
[movorack] movorack is offline
Miguel A. Valero
 
Registrado: feb 2007
Ubicación: Bogotá - Colombia
Posts: 1.346
Reputación: 20
movorack Va camino a la famamovorack Va camino a la fama
¡Hola, bulc!

No se si te logro comprender del todo lo que necesitas.

Código Delphi [-]
function TForm1.getLines2(Lines1: TStrings): TStrings;
  var
    i: integer;
begin
  Result := TStringList.Create;

  if (Lines1[0]='') then
    Lines1.Delete(0);  // Corchete y paréntesis.

  for I:= 0 to Lines1.Count - 1 do
    if (Lines1[i]='') then
      Lines1.Delete(I) ;

  ShowMessage ('Lines1: ' +  IntToStr (Lines1.Count ) );

  for I:= 0 to Lines1.Count - 1 do
    if ( I Mod 2 = 0 ) then
      Result.Add(Lines1[i] + Lines1[I+1]) ;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  Memo2.Lines.Assign(getLines2(Memo1.Lines));
end;
__________________
Buena caza y buen remar... http://mivaler.blogspot.com
Responder Con Cita