Big topic – can’t cover it all.
Modules are similar to functions or procedures in some other languagues.
These can be in the same source with the “main module” or in seperate sources.
The main must contain prototypes of the modules with the types of all parameters
Recommed this site: