KSH: Import File With Variables and Functions

How do I import variables and functions defined in lib.ksh script to another ksh script called setup.ksh under Linux / Unix like operating systems? How do I execute commands from a file in the current KSH shell? To read and execute commands from given FILENAME in the current shell use the following syntax:

. /path/to/file

OR

. /path/to/lib.ksh

The . (dot) is one of the KSH built-in commands. You can also use an alias called source as follows: