Basic HTML version of Foils prepared Sept 20 97

Foil 59 Additional Control Flow Constructs I

From Tutorial on PERL Computational Science for Information Age Course CPS616 -- Sept 20 97. by Geoffrey C. Fox,Nancy McCracken,Tom Scavo


1 last, next and redo provide ways to alter execution flow in loops:
2 while (something is tested) {
  • # redo goes to here
  • somecalc1;
  • if (somecondition) {
    • somecalc2;
  • }
  • somecalc3;
  • #next goes to here
3 }
4 # last jumps to here
5 last jumps out of loop
6 next jumps over rest of loop
7 redo jumps back to start of loop
8 These commands control innermost enclosing for, foreach, or while loop

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Sep 21 1997