      SUBROUTINE WRTONLU(VECTOR, N, LU)
C-
C- THIS SUBROUTINE WRITES THE ARRAY VECTOR ON LOGICAL UNIT LU.
C- IF N .LE. 1  AN EOF IS WRITTEN ON LU AND THE FILE IS REWOUND.
C-
      DIMENSION VECTOR(*)
C-
      IF (N .GT. 1)   GO TO 100
      ENDFILE LU
      REWIND LU
      RETURN
C-
  100 WRITE(LU) (VECTOR(I), I = 1, N)
      RETURN
      END
