
C THIS SUBROUTINE CHANGES THE STATEMENT LABELS IN A 'IF' LINE
C IT IS PART OF THE MAIN PROGRAM 'RESEQ.FOR'
C	MODIFIED ACCORDING TO L L MORTON'S CHANGES BY RWB. 6/81
C
	SUBROUTINE NIF()
	LOGICAL*1 STRING(81), SPARE(81), TAB, J1X, K1X
C
	COMMON /A/ JJ,J
	COMMON /C/ LL, L, STRING, SPARE
	DATA TAB/09/
C
	J1X = STRING(L+LL)
	K1X = STRING(L-1)
C
C ---
C
C	IF((J1X .NE. ' ' .AND. J1X .NE. '(') .OR. (K1X .NE. TAB .AND.
C     1	K1X .NE. ' ' .AND. K1X .NE. ')')) RETURN

	IF(J1X .NE. TAB .AND. J1X .NE. ' ' .AND. J1X .NE. '(') RETURN
	IF(K1X .NE. TAB .AND. K1X .NE. ' ' .AND. K1X .NE. ')') RETURN
C
C ---
C
	ILENG = LEN(STRING)
	JC = 1
	DO 100, J=L+LL, ILENG
		IF(STRING(J) .EQ. '(') GOTO 109
100	CONTINUE
109	DO 105, JB=J+1,ILENG
		IF(STRING(JB) .EQ. '(') JC=JC+1
		IF(STRING(JB) .EQ. ')') JC=JC-1
		IF(JC .EQ. 0) GOTO 110
105	CONTINUE
110	J = JB+1
	CALL LOOKUP()
	DO 140, JZ=1,2
		DO 120, K=J,ILENG
		IF(STRING(K).LE.'Z'.AND.STRING(K).GE.'A') RETURN
			IF(STRING(K) .EQ. ',') GOTO 130
120		CONTINUE
		IF(K .EQ. ILENG) RETURN
130		J = K+1
		CALL LOOKUP()
140	CONTINUE
	RETURN
	END
