[fpc-pascal] TStringStream.DataString returns garbage?

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Feb 1 23:15:32 CET 2012


Thanks Mattias for replying so quickly.


On 2 February 2012 00:10, Mattias Gaertner  wrote:
>> var
>>   srcstream: TStringStream;
>>   s, f: string;
>
> I guess string is an ansistring?


Yes.



> if s<>'' then // this if is not needed in this case
>  srcstream.Write(s[1], Length(s))

Argh, rookie mistake! :-/  How did I miss that.  Many thanks, my code
is working now. :-D



-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net



More information about the fpc-pascal mailing list