Re: Including same libraries two or more times
- Posted by ZNorQ Dec 10, 2014
- 1403 views
_tom said...
- An include file is physically "included" just once for any program.
- Duplicated includes are quietly ignored and do not add extra bloat to your program.
- Top level code within an include file will be executed the first time an include file is encountered (and then ignored for extra includes). For example puts(1, "hello" ) in an include file will be executed once.
The extra includes only make code available to the including file.
If you shroud, bind, or compile then any unused code is removed and the final program is a small as possible.
_tom
Great feedback _tom, much appreciated.
Regards, Kenneth aka ZNorQ.