Hola.
Código Delphi
[-]
function TForm1.SumarLineas(Lineas: TStrings): Double;
var
i: Integer;
Value: Double;
begin
Result:= 0;
for i:= 0 to Lineas.Count - 1 do
begin
if TryStrToFloat(Lineas[i], Value) then
Result:= Result + Value;
end;
end;
llamada:
Código Delphi
[-]
Edit1.Text:= FloatToStr( SumarLineas(Memo1.Lines) );
Nota: El parámetro lo hice de tipo TStrings así te permite cosas como:
Código Delphi
[-]
Edit1.Text:= FloatToStr( SumarLineas(ListBox1.Items) );
Edit1.Text:= FloatToStr( SumarLineas(RichEdit1.Lines) );
Saludos.