Conditional structures: Difference between revisions

Content added Content deleted
(add description and justification for other conditionals)
Line 4: Line 4:


;Task:
;Task:
List the   ''conditional structures''   offered by a programming language.
List the   ''conditional structures''   offered by a programming language. See https://en.wikipedia.org/wiki/Conditional_(computer_programming) for a description.

Common conditional structures are     '''if-then-else'''     and     '''switch'''. Less common structures are ''arithmetic if'', ''ternary operator'' and ''Hash-based conditionals''.
''Arithmetic if'' allows tight control over computed gotos, which optimizers have a hard time to figure out.


Common conditional structures are     '''if-then-else'''     and     '''switch'''.
<br><br>
<br><br>