On 2015/08/28 18:56, Sven Barth wrote:
Am 28.08.2015 11:08 schrieb "Toru Takubo" <tak...@e-parcel.co.jp 
<mailto:tak...@e-parcel.co.jp>>:
 >
 > Hi all,
 >
 > I'm trying FPC 3.0.0-rc1 and find "Continue" does not work properly
 > in except clause but just jump to finally clause on win64.
 >
 > Here is a sample code:
 > ----------------------------
 > program sample;
 >
 > {$mode objfpc}
 >
 > uses
 >    SysUtils;
 > var
 >   i: Integer;
 > begin
 >   try
 >     for i:=0 to 2 do begin
 >       try
 >         Writeln(IntToStr(i));
 >         raise Exception.Create('');
 >       except
 >         Continue;
 >       end;
 >     end;
 >   finally
 >     Writeln('done.');
 >     Readln;
 >   end;
 > end.
 > ----------------------------
 >
 > The result on win32:
 > ----------------------------
 > 0
 > 1
 > 2
 > done.
 > ----------------------------
 >
 > The result on win64
 > ----------------------------
 > 0
 > done.
 > ----------------------------
 >
 > Why such difference? Is this a bug?

It's because since 2.7.1 a different exception handling mechanism is used on 
Win64 (and also Win32 if enabled). But yes, it should probably be considered as 
a bug, so please file a bug report. As a workaround you could use a boolean 
variable that you set inside the handler and evaluate it afterwards.

Regards,
Sven


Thank you for your explanation. I will submit a bug report.

Regards,

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

Reply via email to