Index of Functions: A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 
Index Page
diffc

Table of contents
Procedure
Abstract
Required_Reading
Keywords
Declarations
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version

Procedure

     DIFFC ( Difference of two character sets )

     SUBROUTINE DIFFC ( A, B, C )

Abstract

     Take the difference of two character sets to form a third set.

Required_Reading

     SETS

Keywords

     CELLS
     SETS

Declarations

     IMPLICIT NONE

     INTEGER               LBCELL
     PARAMETER           ( LBCELL = -5 )

     CHARACTER*(*)     A      ( LBCELL:* )
     CHARACTER*(*)     B      ( LBCELL:* )
     CHARACTER*(*)     C      ( LBCELL:* )

Brief_I/O

     VARIABLE  I/O  DESCRIPTION
     --------  ---  --------------------------------------------------
     A          I   First input set.
     B          I   Second input set.
     C          O   Difference of A and B.

Detailed_Input

     A        is a set.


     B        is a set, distinct from A.

Detailed_Output

     C        is a set, distinct from sets A and B, which
              contains the difference of A and B (that is,
              all of the elements which are in A, but NOT
              in B).

              If the size (maximum cardinality) of C is smaller
              than the cardinality of the difference of A and B,
              then only as many items as will fit in C are
              included, and an error is returned.

Parameters

     None.

Exceptions

     1)  If the difference of the two sets causes an excess of
         elements, the error SPICE(SETEXCESS) is signaled.

     2)  If length of the elements of the output set is less than
         the length of the elements of the FIRST input set, the
         error SPICE(ELEMENTSTOOSHORT) is signaled.

Files

     None.

Particulars

     None.

Examples

     The DIFFERENCE of two sets contains every element which is
     in the first set, but NOT in the second.

           {a,b}      difference  {c,d}     =  {a,b}
           {a,b,c}                {b,c,d}      {a}
           {a,b,c,d}              {}           {a,b,c,d}
           {}                     {a,b,c,d}    {}
           {}                     {}           {}

     The following call

           CALL DIFFC  ( PLANETS, ASTEROIDS, RESULT )

     places the difference of the character sets PLANETS and
     ASTEROIDS into the character set RESULT.

     The output set must be distinct from both of the input sets.
     For example, the following calls are invalid.

           CALL DIFFI  ( CURRENT,     NEW, CURRENT )
           CALL DIFFI  (     NEW, CURRENT, CURRENT )

     In each of the examples above, whether or not the subroutine
     signals an error, the results will almost certainly be wrong.
     Nearly the same effect can be achieved, however, by placing the
     result into a temporary set, which is immediately copied back
     into one of the input sets, as shown below.

           CALL DIFFI  ( CURRENT, NEW,  TEMP )
           CALL COPYI  ( TEMP,    NEW        )

Restrictions

     None.

Literature_References

     None.

Author_and_Institution

     N.J. Bachman       (JPL)
     C.A. Curzon        (JPL)
     J. Diaz del Rio    (ODC Space)
     W.L. Taber         (JPL)
     I.M. Underwood     (JPL)

Version

    SPICELIB Version 1.1.0, 20-AUG-2021 (JDR)

        Added IMPLICIT NONE statement.

        Edited the header to comply with NAIF standard.

    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 (CAC) (WLT) (IMU) (NJB)
Fri Dec 31 18:36:13 2021