(Notes) (Subject Notes) Informatics Practices (Iteration )

Disclaimer: This website is NOT associated with CBSE, for official website of CBSE visit - www.cbse.gov.in

(Subject Notes) Informatics Practices

Iteration

 

LOOP
   Statements;
   ... EXIT ...
   MoreStatements;
END LOOP;

WHILE Cond LOOP
   Statements;
END LOOP;

FOR Var IN LoVal..HiVal LOOP
   Statements;
END LOOP;

 

EXIT WHEN Cond;
   is shorthand for
IF Cond THEN EXIT; END IF;
Loops can be named to allow multi-level exits
   <<outer>>LOOP
      ...
      <<inner>>LOOP
         ... EXIT outer WHEN i > 100; ...
      END LOOP;
      ...
   END LOOP;

 

Courtesy : Cbseguess.com

 

  Go To Page :   1,   2,   3,   456   >>