SLIDE 05          < Previous     Next >          Close Window


for (i=0; i<10; i++) processData(i);
i=0; checkSum=0;
while (checkSum< 1000
&&     checkSum!= 450
&&     checkSum!= 735) {
  for   (x=0; x<10; x++) {
    for (y=0; y<20; y++) {
      addUp(&checkSum,x,y); if (y<5) checkSum++; }}   //  SPEC51-compliant.
  i++; }

verifyChecksum(checkSum);


When reading code, ignore the braces and simply follow the indentation.  Everything indented (yellow) under this "while" (green) is part of the "while" statement.