[fpc-devel] Pointer type declaration issue

Thaddy thaddy at thaddy.com
Wed Nov 10 21:20:51 CET 2010


Small example, 2.5.1 trunk from today

---
program Project2;

{$APPTYPE CONSOLE}
uses windows;

{$DEFINE SHOULD_COMPILE_IN_FPC }  // add dot after "{"
{$IFDEF SHOULD_COMPILE_IN_FPC}
type
   PPValueA = ^TPValueA;
   PPValue = PPValueA;

   pvalueA = packed record
     pv_valuename: PAnsiChar;           { The value name pointer }
     pv_valuelen: BOOL;
     pv_value_context: Pointer;
     pv_type: DWORD;
   end;

   pvalue = pvalueA;
   TPValueA = pvalueA;
   TPValue = TPValueA;
{$ELSE WILL_COMPILE_IN_FPC}
type

   pvalueA = packed record
     pv_valuename: PAnsiChar;
     pv_valuelen: BOOL;
     pv_value_context: Pointer;
     pv_type: DWORD;
   end;

   TPValueA = pvalueA;
   TPValue = TPValueA;

   PPValueA = ^TPValueA;
   PPValue = PPValueA;

   pvalue = pvalueA;

{$ENDIF}
begin
//
end.




More information about the fpc-devel mailing list