.he 'IF''Page %'
.fo 'Steven Hardy''January 78'
IF
.br
--
.br
This is the first word of a conditional expression, for example:
.tp 4
 	: IF	TOUGH(STEAK)
 	: THEN	FRY(STEAK)
 	: ELSE	GRILL(STEAK)
 	: CLOSE
.br
When this statement is executed, the POP11 system first executes the
condition (i.e. TOUGH(STEAK));  if this evaluates to 
FALSE then GRILL(STEAK) is executed, otherwise FRY(STEAK) is executed.
The full syntax of allowable conditional commands is quite complex.  An IF
statement has the form:
.tp 6
 	: IF	<condition>
 	: THEN	<consequent>
 	: ELSEIF<condition>
 	: THEN	<consequent>
 	: ELSE	<consequent>
 	: CLOSE;
.br
Where 'ELSE <consequent>` can be omitted if desired and where 'ELSEIF <condition>
THEN <consequent>' can be either omitted or repeated
as many times as required.  A <condition> is any expression 
and a <consequent>
is any sequence of POP11 statements.  IF statements can be nested inside
one another, i.e. a <condition> or a <consequent> of an
IF statement may itself contain IF statements.
.br
It is permissible, but unusual, for a <consequent> to contain
.ul
no
code at all, for example:
.tp 7
 	: FUNCTION PRLIST(LIST);
 	:	IF	LIST=[]
 	:	THEN
 	:	ELSE	PPR(HD(LIST));
 	:		PRLIST(TL(LIST));
 	:	CLOSE
 	: END
.br
See UNLESS.
