Skip to content

Program (with Type declarations)

The program remains our overarching building block, containing the code that defines the other building blocks that we have been creating. When you want to declare your own types, you do so in your program’s code. This makes it possible to model the data, in the same way as you model the actions in your code using functions and procedures.

Figure x.y: A Program can contain Type Declarations

A Program can contain Type Declarations

Program - Why, When, and How

The role of the program has not changed, but now you can start to think about the types that you want to exist within your code. Organising your data will help make it easier to work with these values throughout your program.

In C/C++