Hi,

I thing the second option is better, but, I have a dude. You will need to 
extract this  strings, then how do you thing to do that? why you don't use the 
TStringList component?

Sami

Andries Bos <[EMAIL PROTECTED]> escribió:                                  I 
have program where I have to create strings for more than 400,000 times and 
write them to a stream.
 
 as an example the following: 
 
 var
 astring, and bstring,... : string;
 
 passing this to a stream could be done with:
 
 procedure WriteText(const AString: string);
 begin
   FStream.Write(PChar(AString)^, Length(AString));
 end;
 
 I have two options to save this to the stream:
 
 1. write the list of strings one by one to the stream.. 
 writestring(astring);
 writestring('  ');
 writestring(bstring);
 ...
 
 2. concatenatie the strings to one new string and then write the resulting 
string to the stream.
 ( 
 
 lstring := astring + '  ' + bstring + '  ' +cstring etc; 
 
 writetext(lstring);
 
 )
 
 At first the second solution seems to be faster (using a stopwatch), but 
mayube there is a drawback.
 
 what is the fastest way to concatenate stings and to pass then to a TStream?
 
 Thanks in advance
 
 __________________________________________________________
 Never Miss an Email
 Stay connected with Yahoo! Mail on your mobile.  Get started!
 http://mobile.yahoo.com/services?promote=mail
 
 [Non-text portions of this message have been removed]
 
 
     
                       

                
---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com

[Non-text portions of this message have been removed]

Reply via email to