© 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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.