> FPC can´t assign value to address, where Delphi can. For example:
>
> TDomNode = class(TDomCustomNode);
> private
> ...
> FUserData : TUtilsWideStringList;
> FUserDataHandlers : TList;
> ...
>
> destructor TDomNode.Destroy;
> var
> I: Integer;
> UserDataEvent: TDomUserDataEvent;
> begin
> // Call user data event handlers:
> if Assigned(FUserData) then
> with FUserData do
> for I := 0 to Pred(Count) do begin
> @UserDataEvent := pointer(FUserDataHandlers[I]);
> if Assigned(UserDataEvent) then
> UserDataEvent(OT_NODE_DESTROYED, WideStrings[I], Objects[I],
> nil, nil);
> end;
> ...
>
> In Delphi, the line
>
> @UserDataEvent := pointer(FUserDataHandlers[I]);
>
> is common practice. What is the difference to FPC and the appropriate
> workaround?
Did you use {$mode delphi} ? If it still fails to compile create a short
example that can be compiled and submit a bug report.
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal