Delegates: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 16:
=={{header|Ada}}==
All that is needed in order to implement this is a common base type. The delegator holds a pointer to an "untyped" object from the base class. Querying if the target implements the delegate interface is done using run-time type identification.
<lang ada>
<Ada>
with Ada.Text_IO; use Ada.Text_IO;
 
Line 65:
Put_Line (A.Operation);
end Delegation;
</Adalang>
Sample output:
<pre>