On Sun, Sep 4, 2016 at 4:29 PM, José Mejuto <joshy...@gmail.com> wrote:
> El 04/09/2016 a las 19:17, Marcos Douglas escribió:
>
>>   try
>>     Buf.LoadFromFile('data.txt');
>>     showmessage(inttostr(ExtractStream(Buf, Buf2))); //<< result is 0, ie,
>> OK
>>     Buf2.SaveToFile('result.txt');
>
>
>> There is no error, but Buf2 is empty.
>
>
> Hello,

Hi,

> I'm not sure but I think that code at least should look like:
>
>   try
>     Buf.LoadFromFile('data.txt');
> --->>>>  Buf.Position:=0;
>     showmessage(inttostr(ExtractStream(Buf, Buf2)));
>     Buf2.SaveToFile('result.txt');
>
> Because I think the stream position is just at the end after LoadFromFile.

Nope, still the same, Buf2 is empty. :(

Marcos Douglas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to