[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
@:
Synopsis
Invoke method in same class without using a message send
Syntax
@:<method name>[ ( [<parameter list>] ) ]
Arguments
<method name> is the name of the method to be invoked. It must
be a method in the same class as the currently executing method,
and should either be defined in the same program module or
according to the rules governing external methods.
<parameter list> is the list of parameters to be sent to the
method being invoked.
Description
Similar to the double-colon (::) for message sends to self,
the 'at-colon' allows direct invocation of methods in the same
class as the invoking method. Since the location of the invoked
method is known in such a case, a message lookup is not necessary.
A direct invocation of this kind is faster than the equivalent
message send, but this is a trade-off for loss of flexibility.
Warning
This feature should be used with great caution, since it prevents
methods invoked in this fashion from being overridden in a
subclass. This is sometimes desirable, however.
For those familiar with C++, @: allows methods to be invoked
in a way similar to that in which ordinary (non-virtual) C++
member functions are invoked. Because of dynamic or late binding,
methods in Clipper normally behave in a similar way to C++ virtual
methods.
See Also:
::
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson