[fpc-pascal] A better way?
Ryan Joseph
ryan at thealchemistguild.com
Fri Apr 15 13:28:14 CEST 2016
> On Apr 15, 2016, at 5:13 PM, Tony Whyman <tony.whyman at mccallumwhyman.com> wrote:
>
> unit unitA;
>
> interface
>
> type
>
> class TClassA
> private
> FClassBObject: TObject;
> public
> procedure SomeProc;
> end;
>
> implementation
>
> uses unitB;
>
> procedure TClassA.SomeProc;
> var aClassBObject: TClassB absolute FClassBObject;
> begin
> aClassBObject.OtherProc;
> end;
>
> end.
I see now. That’s possibly preferable so I’ll keep it in mind but like you said just sucking it up and type casting is not so bad. :) Sure enough but it would even better if the compiler was more friendly here. If there was a good pre parser in FPC I’d just make some custom syntax but that’s not an option either as far as I know.
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list