cplusplus:control_structures_repetition_in_algorithms
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
cplusplus:control_structures_repetition_in_algorithms [2013/06/30 09:14] – [Input validation] mithat | cplusplus:control_structures_repetition_in_algorithms [2014/02/24 22:12] – mithat | ||
---|---|---|---|
Line 2: | Line 2: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
- | ====== Control Structures: Repetition in algorithms | + | ====== Control Structures: Repetition in Algorithms |
Mithat Konar\\ | Mithat Konar\\ | ||
- | 2013-02-28 | + | 2014-02-24 |
===== Introduction ===== | ===== Introduction ===== | ||
Line 15: | Line 15: | ||
===== Input validation ===== | ===== Input validation ===== | ||
- | * "Block moving to next section until user has entered valid data." | + | * "Prevent |
* Pseudo code:< | * Pseudo code:< | ||
While input value is not valid | While input value is not valid | ||
Get input value from user</ | Get input value from user</ | ||
- | ===== Sentinel/flag control ===== | + | ===== Sentinel control ===== |
* **Sentinel**: | * **Sentinel**: | ||
- | * Value(s) that indicate(s) a special condition; " | + | * Value(s) that indicate(s) a special condition---a " |
- | * **Flag**: | + | |
- | * Sometimes used as a synonym for sentinel | + | |
- | * Sometimes means a sentinel that is a Boolean value | + | |
===== Sentinel-controlled repetition ===== | ===== Sentinel-controlled repetition ===== | ||
Line 35: | Line 32: | ||
Get input value</ | Get input value</ | ||
* Input validation might be considered a special case of sentinel controlled repetition. | * Input validation might be considered a special case of sentinel controlled repetition. | ||
+ | * **Flag**: | ||
+ | * Sometimes used as a synonym for sentinel | ||
+ | * Sometimes means a sentinel that is a Boolean value | ||
===== Menus ===== | ===== Menus ===== |
cplusplus/control_structures_repetition_in_algorithms.txt · Last modified: 2020/02/10 21:45 by mithat