[fpc-pascal] corba interfaces - is/as not working properly

David Emerson dle3ab at angelbase.com
Fri Sep 30 04:55:09 CEST 2016


On 09/29/2016 06:06 AM, Sven Barth wrote:
> Am 29.09.2016 11:34 schrieb "Martin Schreiber" <mse00000 at gmail.com
> <mailto:mse00000 at gmail.com>>:
>>
>> On Thursday 29 September 2016 10:49:03 Graeme Geldenhuys wrote:
>> > On 2016-09-29 06:42, Martin Schreiber wrote:
>> > >  abcintf:= iabc(abc);
>> > > "
>> > > which has the best performance.
>> >
>> > But you must still remember to check if abcintf has been successfully
>> > assigned.
>> >
>> There will be a compiler error if "abc" does not implement "iabc".
>
> Graeme meant that abc can still be Nil.

Or perhaps, var abc : TObject (or some other descendent passed as a 
variable) -- it may or may not support iabc, but we want to check, and 
do something with it if it does.

~David





More information about the fpc-pascal mailing list