IRAF help page for package language, program while

from NOAO while -- while loop constructSYNTAXELEMENTSDESCRIPTIONEXAMPLESSEE ALSO

while -- while loop construct


SYNTAX

while (expression) statement


ELEMENTS

while

Required keyword.

expression

A boolean valued expression tested before each iteration.

statement

A statement (possibly compound) to be executed in each iteration of the loop.


DESCRIPTION

The while loop executes the enclosed statements while the specified condition is true.


EXAMPLES

1. An infinite loop.

	while (yes) {
	    sleep 30
	    time
	}

2. Type a file.

	list = "home$login.cl"
	while (fscan (list, line) != EOF)
	    print (line)

SEE ALSO

SEE ALSO, for, case, break, next,


This page automatically generated from the iraf .hlp file. If you would like your local iraf package .hlp files converted into HTML please contact Dave Mills at NOAO.

dmills@noao.edu