I'm not experienced in Delphi at all and I have a very old project that can be compiled in Delphi of 2nd,3rd versions but isn't working in Delphi 4. The problem is about pointers that are working differently in the newer version.
These pieces of code cause error "Variable required":
pEnabled := @pClrWire_s^.enabled;
pEnabled := @Enabled;
pNEnabled := @pName_s^.Enabled;
where pEnabled is:
const
pEnabled : ^boolean = nil;
and pClrWire_s and pName_s are pointers as well:
pClrWire_s : TpImage; {pointer to an image of colored wire}
pName_s : TpNamed; {pointer to the identifier}
Description of TpImage and TpNamed are found in other files of the project:
type
TpImage = ^TImage;
TpNamed = ^TNamed;
TNamed = class(TLabel)
Can this problem be solved without serious rewriting of the whole code? and what causes such problem with Delphi 4?