repeat-until C while repeat-until
repeat-until while
while repeat-until
while
15.1.2 Loop-with-exit
Loop-with-exit Ada
Loo-with-exit C while break goto
loop-with-exit
loop-with-exit Ada
Ada Loop-with-exit
loop
exit when(some exit condition);
end loop;
loop-with-exit
C loop-with-exit
/* Compute scores and ratings */
score=0;
GetNextRating(&RatingIncrement);
Rating=Rating + RatingIncrement;^
while(Scroe < TargetScore && RatingIncrement!=0)
{
GetNextScore(&ScoreIncrement);
Scroe=Score + ScoreIncrement;
GetNextRating(&RatingIncrement);
Rating=Rating + RatingIncrement;^
}
C loop-with-exit
/*Compute scores and ratings. The loop uses a FOREVER macro