aboutsummaryrefslogtreecommitdiff
path: root/pkg/language/doc/next.hlp
blob: 49a8eaa3d0a3f83cfb8a4eb12419117ffa04f76a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.help next Feb86 language
.ih
NAME
next -- start the next iteration of a for or while loop
.ih
USAGE
next
.ih
DESCRIPTION
The \fInext\fR statement begins the next iteration of the loop construct
in which it is enclosed, without executing any of the statements remaining
before the end of the loop.
.ih
EXAMPLES
1. Sum the pixels in a two dimensional array.  Skip any negative valued pixels.

.nf
	for (i=1;  i <= NCOLS;  i+=1) {
	    for (j=1;  j <= NLINES;  j+=1) {
		if (pixel[i,j] < 0)
		    next
		total += pixel[i,j]
	    }
	}
.fi
.ih
SEE ALSO
break, while, for
.endhelp