3.15 Example 14

  8870 lpwrite ()
       {
        register int c;
        while ((c=cpass()) >= 0)
          lpcanon(c);
       }

This is an example of the “while” statement, which should be compared with the “do ... while ...” construction encountered earlier. (Cf. the “while” and “repeat” statements of Pascal.)

The meaning of the procedure is

Keep calling “cpass” while the result is positive, and pass the result as a parameter to a call on lpcanon.

Note the redundant “int” in the declaration for “c”. It isn’t always omitted!