[fpc-pascal] A better way?
pascaldragon at googlemail.com
Fri Apr 15 14:03:50 CEST 2016
Am 15.04.2016 13:58 schrieb "Ryan Joseph" <ryan at thealchemistguild.com>:
> > On Apr 15, 2016, at 5:13 PM, Tony Whyman <tony.whyman at mccallumwhyman.com>
> > 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.
Again, you're fighting against design principles of the language. It's just
as if you'd want to have virtual class methods in C++...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal