I thought this would be easier, but I need some help.

I have the following code in a button onexecute method, but I get this 
error:

Signal Received. Signal: SIGSEGV, segmentation fault.  Function: fpc 
ansistr decr ref

I have taken this code from a free pascal online tutorial.

Any ideas what is going on here?

var
     fsfile : tfilestream;
    s1, s2 : string;
begin
   with fsfile.Create ('data/myfile.dat', fmOpenRead)
   do begin
     try
       str (position, s1);        // get the stream position
       str (size, s2);            // get the stream size
       showmessage ('file stream position, size: ' + s1 + ', ' + s2);
     finally
       Free;
     end;
   end;
end;


Thanks.

Patrick

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to