Basic HTML version of Foils prepared March 30 97

Foil 58 Additional Control Flow Constructs III -- Accelerated Tests
(Chapter 9 of the Llama Book)

From PERL4 Tutorial for CPS616 Computational Science for Information Age Course CPS616 -- February 1995. by Geoffrey C. Fox


There are a set of ways of doing simple tests which imply 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; # should be self explanatory



© 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 Sat Sep 6 1997