Porting to Delphi 2009 - Invalid Typecast Error
I am converting a GraphicEx project to Delphi 2009.
I am having trouble converting the following procedure to unit Scanf_c.pas . Here's the problem:
With TscRec(FType) do begin
FType is an integer and is defined by TscRec:
TscRec = packed record // Has size of an integer
Case byte of
0: ( Typ : byte; Size : char; Flags : word;);
1: ( SizeType : word; iFlags : smallInt;);
end;
This code seems to work fine in delphi 2007, but I have a problem compiling it in Delphi 2009. Compiler error - "Invalid Typecase". The problem is when simulating FType is an integer in TScRec which is a record.
Does anyone have such problems with Delphi 2009 and is there a solution.
thank
+2
source to share