Basic HTML version of Foils prepared Sept 20 97

Foil 61 Additional Control Flow Constructs III -- Accelerated Tests

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


There are ways of performing simple tests that require fewer curly braces and other punctuation
expr1 if testexp; # is equivalent to
if (testexp) {
  • expr1;
}
last, redo, and next can be followed by such tests e.g.
last DOREALWORK if userendofinitializationhit ;
There are similar abbreviations for unless,while,until
dothisexpression unless conditionholds;
dostandardstuff while normalconditionholds;
dostandardstuff until specialconditionseen;



© 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