© Igor Zhirkov 2017

Igor Zhirkov, Low-Level Programming, 10.1007/978-1-4842-2403-8_10

10. Code Structure

Igor Zhirkov

(1)Saint Petersburg, Russia

In this chapter we are going to study how to better split your code into multiple files and which relevant language features exist. Having a single file with a mess of functions and type definitions is far from convenient for large projects. Most programs are split into multiple modules. We are going to study which benefits it brings and how each module looks before linkage.

10.1 Declarations and Definitions

The C compilers historically were written as single-pass programs . It means that they should have traversed the file once and translated it right away. However, it does mean a lot to us. When a function ...

Get Low-Level Programming: C, Assembly, and Program Execution on Intel® 64 Architecture now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.