Why revise a synthesis?
As already mentioned in this course, mastering line breaks should become natural and automatic, a bit like shifting gears when you're learning to drive. You don't even have to think about it. That's what you have to achieve.
The computer itself is a robot that contains its own internal program to execute the program you've encoded. This internal program will ask the computer, after executing a line, to skip to the next line or to jump to another line according to the rules below.
If you haven't absorbed this, you won't be able to program or code correctly. The following is therefore of the utmost importance, and you should be able to do it automatically.
Here's a summary of everything we've seen in algorithmics about line breaks...
If we encounter... | Result | We perform the action... |
---|---|---|
Instruction | Continue to next line | |
IF | True | Continue to next line |
IF | False | No ELSE? Jump after the corresponding END IF An ELSE? Jump after the corresponding ELSE |
ELSE | Jump after the corresponding END IF | |
END IF | Continue to next line | |
REPEAT | Continue to next line | |
UNTIL | True | Continue to next line |
UNTIL | False | Jump after the corresponding REPEAT |
WHILE | True | Continue to next line |
WHILE | False | Jump after the corresponding END WHILE |
END WHILE | Automatically jump to the corresponding WHILE |
Note that, in all cases where the result of the verification is True, the computer will continue execution of the program on the next line.
Please make sure you understand these essential rules.