You could compile the external source code (in the .txt file for this example) on run time and then load it dynamically. Although that means the user of your program needs to have a compiler installed. And now we are talking about really advanced stuff.
Or, if your .txt-files would only need a limited sets of functions and not too much code (we are not talking about real-time code here, do we?) you can easily make some kind of simple naive parser (e.g. line-by-line each argument separated by space, first argument function-name) for it without that much knowledge on how to write an optimized one.