You can do that by using overload, that means write an overload version of the IfThen function and assign as result the wanted ifthen. To better understand look at this code

```
unit CommonFunctions;
interface
uses
Math, StrUtils, SysUtils, classes;
//the 3 IfThen from Math
function IfThen(AValue: Boolean; const ATrue: Integer; const AFalse: Integer = 0): Integer; overload;
function IfThen(AValue: Boolean; const ATrue: Int64; const AFalse: Int64): Int64; overload;
function IfThen(AValue: Boolean; const ATrue: Double; const AFalse: Double = 0.0): Double; overload;
// then the IfThen from StrUtils
function IfThen(AValue: Boolean; const ATrue: string; AFalse: string = ''): string; overload;
//and finally your own ifthen
function IfThen(AValue: Boolean; const ATrue: char; AFalse: char): TStrings; overload;
implementation
//the 3 IfThen from Math
function IfThen(AValue: Boolean; const ATrue: Integer; const AFalse: Integer = 0): Integer;
begin
result := Math.IfThen(AValue, ATrue, AFalse);
end;
function IfThen(AValue: Boolean; const ATrue: Int64; const AFalse: Int64): Int64;
begin
result := Math.IfThen(AValue, ATrue, AFalse);
end;
function IfThen(AValue: Boolean; const ATrue: Double; const AFalse: Double): Double;
begin
result := Math.IfThen(AValue, ATrue, AFalse);
end;
// then the IfThen from StrUtils
Function IfThen(AValue: Boolean; const ATrue: string; AFalse: string = ''): string;
begin
result := StrUtils.IfThen(AValue, ATrue, AFalse);
end;
//and finally your own ifthen
Function IfThen(AValue: Boolean; const ATrue: char; AFalse: char): TStrings;
begin
result.Add(ATrue);
result.Add(AFalse);
end;
end.
```

Then you can call any IfThen just by adding CommonFunctions in the uses (no math or strutils necessary now) as follows```
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses
CommonFunctions;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
s: TStrings;
begin
ShowMEssage(IntToStr(IfThen(true, 10, 20))); //from math
ShowMEssage(IfThen(true, 'True', 'False')); //from strutils
s := TStringList.create;
s.AddStrings(IfThen(false, 'a', 'z')); //and your own
ShowMEssage(s[0]);
ShowMEssage(s[1]);
s.Free;
end;
end.
```