Programming Constructs
Door Steve Moore
1. Assignment
1.1. assigning a value to a variable
1.2. can be a constant
1.2.1. e.g. "Hello"
1.2.2. e.g. 4.7
2. Comparison
2.1. comparing two values
2.2. comparison operators
2.2.1. Equal to
2.2.1.1. ==
2.2.2. Not equal to
2.2.2.1. <>
2.2.3. Greater than
2.2.3.1. >
2.2.4. Less than
2.2.4.1. <
2.2.5. Greater than or equal to
2.2.5.1. >=
2.2.6. Less than or equal to
2.2.6.1. <=
3. Selection
3.1. Taking different paths in a program based on values
3.2. Conditional Statement
3.2.1. IF..THEN..ELSE
3.2.1.1. Simple Condition
3.2.1.1.1. IF <SOMETHING> THEN...
3.2.1.2. Complex Condtion
3.2.1.2.1. IF <SOMETHING> and/or <SOMETHING ELSE>
4. Iteration
4.1. Repeating lines of code
4.2. Fixed Loops
4.2.1. used when the instructions need to be repeated a set number of times
4.2.2. FOR player 1 TO 11 DO
4.3. Conditional Loops
4.3.1. used then the instructions need to be repeated an unknown number of times
4.3.2. REPEAT...UNTIL guess == mystery_number