(page requirements)
Keywords

Two functions with the same name in two units

Q:

If you have two functions -- both with the same name -- defined in two units, how do you distinguish which is which?

For example, let's say you have an unit called Unit1 and it has a function called functionA. You have another unit, called Unit2, and it's got a function called functionA which performs a different function than the functionA in Unit1.

A:

To access functionA in Unit1 type:

Unit1.functionA;

and to access functionA in Unit2 type:

Unit2.functionA;

 
 
Applicable Keywords : Delphi, Delphi 1.x, Delphi 2.x
 
 
 
Copyright © 2009 Chami.com. All Rights Reserved. | Advertise | Created in HTML Kit editor