EVEN ( Is an integer even? )
LOGICAL FUNCTION EVEN ( I )
Determine whether an integer is even.
None.
NUMBERS
INTEGER I
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
I I The integer in question.
EVEN O True if I is even, otherwise false.
I is the integer to be tested for evenness.
EVEN is true if I is even, false if I is odd.
None.
Error free.
None.
None.
Let ENDPTS contain a series of endpoints,
a , b , ..., a , b
1 1 n n
representing an ordered collection of disjoint intervals,
a < b < a
i - i i+1
The following code fragment uses EVEN to determine whether
an arbitrary value X is contained in any of the intervals.
CONTAINED = .FALSE.
DO I = 1, N-1
IF ( X .GE. ENDPTS(I) .AND. X .LE. ENDPTS(I+1) ) THEN
CONTAINED = ( .NOT. EVEN ( I ) )
END IF
END DO
None.
None.
I.M. Underwood (JPL)
SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)
Comment section for permuted index source lines was added
following the header.
SPICELIB Version 1.0.0, 31-JAN-1990 (IMU)
|