%N nel %F $MIR/src/subs/utilities.for
%D Return the number used values in an array
%P bpw
%: utilities
%B
      integer          function neli ( i, ni )
      integer          function nelr ( r, nr )
      integer          function neld ( d, nd )
      integer          i(ni)
      real             r(nr)
      double precision d(nd)
      integer          ni, nr, nd

 Nel returns the index of the last used element of the input array,
 i.e. it gives the used length of the array, which is defined as the
 index of the last non-zero element. The result is 0 if all elements are
 0 and nx if all elements are non-zero. Nelr works on real arrays, neli
 on integer arrays and neld on double precision arrays.

 Input:
   i/r/d:      input array
   ni/nr/nd:   number of elements of input array
