Basic HTML version of Foils prepared
March 30 97
Foil 26 Control Structures -- while,until (Chapter 4 of the Llama Book)
From
PERL4 Tutorial for CPS616 Computational Science for Information Age Course CPS616 --
February 1995
.
by
Geoffrey C. Fox
1
The simplest iterations are while and until
2
while ( TESTEXPRESSION) {
some statement block; # Execute if TESTEXPRESSION true
}
3
is illustrated by
4
while ( <STDIN> ) {
Process Current Input line; # until end-of-file seen by null character in <STDIN>
}
5
Conversly we can wait for a signal to stop something
6
until ( TESTEXPRESSION) {
some statement block; Execute if TESTEXPRESSION false
}
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 Sat Sep 6 1997