CS 3304: Comparative Languages
Control Structures
[
Course Documents
] : [
Control Structures
]
Previous
Contents
Next
Keyword Index
Logic Loops: Examples
Pascal: separate pretest and posttest logical loop statements (
while-do
and
repeat-until
)
C and C++: also have both, but the control expression for the post-test version is treated just like in the pretest case (
while-do
and
do-while
)
Java: like C, except the control expression must be Boolean (and the body can only be entered at the beginning--Java has no goto)
Ada: a pretest version, but no post-test
FORTRAN 77 and 90: have neither