2.2.1: understand the structural components of a program (variable and type declarations, command sequences, selection, iteration, data structures, subprograms)
Keyword | Definition |
---|---|
command sequence | lines of code that give instructions that will be executed in order |
data structure | arrays, lists and records that can store multiple values |
declaration | line of code that says what a variable will be called and what type of data it will store |
iteration | lines of code that control how many times a section of code should be repeated |
selection | lines of code that work out a boolean expression to decide which lines of code to execute next |
subprogram | a section of code (procedure or function) with a name that performs a specific task |
Type | integer, boolean, real, character or string |
variable | data structure with a name. Used to store a value that can change whilst the program runs |