Controlling Data within the System
Stuff to memorise this Week "Parameters allow us to copy data from one function to another"
Some more words… Assignment Sequence Selection Repetition Proceduralisation Parameters Return Values
= Assignment Assignment is carried out by the assignment operator The assignment operator copies data from right to left. Destination = Source
The Debugger Allows us to see the flow of code and data in real time F9 – toggle breakpoint F10 – step over F11 – step into F5 – continue Let’s look at the code you created last week
Sequence Normal flow of the code One line after another
Selection Selects different blocks of code depending on conditions If (certain condition applies) { //do this } Else Let’s look at the Delete button using the debugger
Repetition Repeat a section of code while a condition is true/false While (This there is still stuff to process) { //keep repeating the code here } Look at the function DisplayAddresses
Proceduralisation Long word to describe making functions Look at the Apply button
Parameters Allow us to copy data from one function to another (If it’s in brackets it is probably a parameter!)
Return Values The result of a function Look at the function DisplayAddresses What is a void function?