C H A P T E R  12

image

Loops and Flow Control

Control Statements

Control statements direct the program to perform a set of operations repeatedly until some condition exists that terminates the repetition. packetC provides all of the C control statements. This includes for-loops, while-do, do-while, and do-until, as well as jump controls such as goto, break, continue, return, and exit. There are no surprises with regard to how packetC implements these control statements.

Looping (Iteration) Statements

Do_while Statement
do  statement  while  (  expression  )  ;

This construct executes its statement, which can be a compound statement, then evaluates ...

Get packetC Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.