Late Bind Calls

Late bind calls in SAL do not have a direct equivalent in the OOP world. In practice it's as if calling a function using the double dot notation in SAL adds a new virtual function to the application.

The new virtual function starts with a dot. Therefore calling the virtual function using the name that starts with a dot behaves exactly the same as virtual functions in C# or Java. While calling the function without using the double dot calls the local function.

For example, in OpenText Team Developer SAL language:

Function: Test
         Call ..TestImplementation()

Is equivalent to:

public SalNumber Test()
 return __TestImplementation();
public virtual SalNumber __TestImplementation()
 return TestImplementation();

Whenever a function is called using the double dot location, Ice Porter creates a second virtual function (using a custom defined prefix - default is __) that by default calls the local function.

Therefore, if the virtual function is overridden in a derived class, the implementation ends up calling the local function in the derived class and everything works as expected.

Late bind calls and multiple inheritance pose additional problems because virtual methods from second base classes cannot be overridden directly. See Multiple Inheritance LateBind calls for more information on how a late bind call from a second base class is routed to the final implementation.

Last updated