Yes, Marco, as you previously suspected, It does.
I saw you gave already a similar answer to mine.

The pointer casts are definitely not necessary, Gennady.

Can you show a little example WHERE it doesn't work? In plain fpc, not lazarus code?


On 22-7-2014 18:13, Marco van de Voort wrote:
In our previous episode, Gennady Agranov said:
Good. And afaik in Delphi mode this works too in FPC? Did you test?

casting integer to set does not compile in FPC - and yes - I use Delphi
mode :(
program setcast;

{$ifdef FPC}
{$mode delphi}
{$else}
{$APPTYPE CONSOLE}
{$endif}

uses
   SysUtils;

type tenum=0..31;
      tmyset= set of tenum;

var x:integer;
     y:tmyset;

begin
   x:=integer(y);
end.

compiles in both FPC (both 2.6.x and trunk) and Delphi (XE4)

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to