	INTEGER FUNCTION INEL(IA,N)
C
C  Note:  This is the UNIX version.  
C
C		Version 1U, D. Gudehus, September 18, 1999
C
C       This function counts the number of 4-byte words in the integer array
C  IA of dimension N.  It is used after a call to USRINP.  If a default 
C  is not taken with USRINP, the correct number will be returned;  however,
C  if a default is taken with USRINP, one must precede the call to USRINP
C  with a call to ISETEND.  For example,   
C	DO I=1,MAXNUMPARAM
C	  J=ISETEND(IPARAMETER(I))
C	END DO
C	CALL USRINP(IPARAMETER,...)
C	NUM=INEL(IPARAMETER,N)
C
	INTEGER IENDLIN
	DIMENSION IA(N)
	DATA IEND/'80000000'X/
C
	DO I=1,N
	  IF (IA(I).EQ.IEND) GO TO 11
	END DO
   11	INEL=I-1
	RETURN
C
	ENTRY IENDLIN(IX)  ! NB This is an integer function
C 
C       This function tests for the end of array indicator and will
C  be true if the idicator is present.
C
	IENDLIN=0
	IF (IX.EQ.IEND) IENDLIN=1
	RETURN
C
	ENTRY ISETEND(IX)
C
C       This function sets the argument equal to the end-of-array
C  indicator.
C
	IX=IEND
	RETURN
C
	END
