Any Till program (module) has two sections: header and functions. The header includes user specified data, incoming arguments management and global variables declarations. The functions section includes all functions in the module. If a module is the running module and its first function does not have parameters, the module will be called the main module, and the function will be called the main function.
No section is mandatory, but for a program to do anything it must have at least one of the sections. Usually, programs that are small utilities does not include functions and all of their activity is done directly at the header section which is the program itself. If it is needed to incorporate program functionalities in functions, then it is a program with functions and the program will start by running the header if it exists and than running the main function if it exists.
It is recommended to further arrange program structure in sections that will reflect programming features such as: header, main, init & reset, logic, data and UI, as demonstrated in Pi Calculator Project.