{ avec un TStrings }
var TSL : TStringList;
begin
TSL := TStringList.Create;
try
TSL.Text := 'par toi même la solution trouver tu devrais, mon jeune apprentis.';
TSL.SaveToFile('c:\talkwithyoda.txt');
finally
TSL.Free;
end;
end;
{ avec un TStream }
var TFS : TFileStream;
TxT : string;
begin
TFS := TFileStream.Create('c:\jediowning.txt',fmCreate);
try
TxT := 'c''est alors qu'Obiwan-sama se rendit compte qu''il etait entouré '+
'de quelques milliers de storm troopers ...';
TFS.WriteBuffer(PChar(TxT)^, Length(TxT));
finally
TFS.Free;
end;
end;