Solved

# How to define IfThen functions in one common unit?

Posted on 2016-10-21

When I want to use **IfThen ** functions I need to use **Math ** and **StrUtils ** units, Math for numeric and StrUtils for string arguments. I also have some of my own IfThen functions that return TVirtualString, some objects and enums, these are defined in **CommonUnit**.

So, when I wan to use all versions of IfThen functions, I need to use Math, StrUtils and CommonUnit units. It's annoying.

Is it possible to somehow define/link IfThen functions from Math and StrUtils within CommonUnit, so I would only need to use CommonUnit and will have access to all IfThen functions?

Using Delphi Berlin 10.1.