[fpc-pascal] Illegal type conversion errors in FPC 2.5.1

Juha Manninen juha.manninen at phnet.fi
Mon Nov 23 20:51:05 CET 2009

On maanantai, 23. marraskuuta 2009 15:42:51 Jonas Maebe wrote:
> You can just add {$packset 1} once. It simply tells the compiler that
> the minimal size by which it can increment the size of sets is 1 byte
> (rather than the default 4 bytes). It does not mean that the compiler
> will try to store all sets in 1 byte.

Thanks. Got it.
I placed {$packset 1} just after {$mode delphi} and it still works.

> type
>    tsetarray = array[1..32] of byte;
>    psetarray = ^tsetarray;
> var
>    i: longint;
> begin
>    for i:=1 to sizeof(setvar) do
>      write(psetarray(@setvar)^[i])
> end.

I will remember that. It would help also the Delphi version of 
VirtualTreeView, not just the Lazarus version.

Juha Manninen

More information about the fpc-pascal mailing list