6.6.2: be able to write functions that may or may not take parameters but must return values, and procedures that may or may not take parameters but do not return values
| Keyword | Definition |
|---|---|
| function | type of subprogram which always returns a value |
| parameter | data passed into a subprogram to customise how it works |
| procedure | type of subprogram which never returns a value |
| return value | data passed out of a function back to the part of code which called it |
| subprogram | either a procedure or function (named section of code which can be customised with parameters and called multiple times) |
| subprogram call | part of the code which causes a subprogram to actually run |
| subprogram definition | part of the code which tells the code what to do when a subprogram runs |