Index Page copy_c

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

Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries

#### Procedure

       void copy_c (  SpiceCell   * cell,
                      SpiceCell   * copy  )

#### Abstract

       Copy the contents of a SpiceCell of any data type to another
       cell of the same type.

#### Required_Reading

       CELLS

#### Keywords

       CELLS

#### Brief_I/O

       VARIABLE  I/O  DESCRIPTION
       --------  ---  --------------------------------------------------
       cell       I   Cell to be copied.
       copy       O   New cell.

#### Detailed_Input

       cell        is a cell of character, double precision, or
                   integer data type.

#### Detailed_Output

       copy        is a cell which contains the same elements as the
                   input cell, in the same order.

#### Parameters

       None.

#### Exceptions

       1) If the cell arguments don't have matching data types,
          the error SPICE(TYPEMISMATCH) is signaled.

       2) If the output cell in not large enough to hold the elements
          of the input cell, the error SPICE(CELLTOOSMALL) is signaled.

       3) If the cell arguments have character type and the length of the
          elements of the output cell is less than the length of the
          elements of the input cell, the error SPICE(INSUFFLEN) is
          signaled.

#### Files

       None.

#### Particulars

       This routine is used primarily to manipulate working cells, since
       many routines that use cells (binary set routines, for instance) do
       not allow cells to be combined or manipulated in place.

#### Examples

       In the following example, copy_c is used to copy the result
       of the union of two character CSICE sets from a temporary
       working set back into the one of the original set.

          #include "SpiceUsr.h"
               .
               .
               .
          /.
          Declare the cell names with string length LNSIZE and maximum
          number of strings SIZE.
          ./
          SPICECHAR_CELL ( bodies,  SIZE, LNSIZE );
          SPICECHAR_CELL ( planets, SIZE, LNSIZE );
          SPICECHAR_CELL ( temp,    SIZE, LNSIZE );
               .
               .
               .
          union_c ( &bodies, &planets, &temp );
          copy_c  ( &temp,   &bodies         );

       If the size of the temporary cell is greater than the size
       of the original set, the function failed_c should be checked to be
       sure that no overflow occurred. If bodies is at least as
       large as temp, no such check is necessary.

#### Restrictions

       None.

#### Literature_References

       None.

#### Author_and_Institution

       N.J. Bachman    (JPL)
       C.A. Curzon     (JPL)
       W.L. Taber      (JPL)
       I.M. Underwood  (JPL)

#### Version

       -CSPICE Version 1.0.0, 08-AUG-2002 (NJB) (CAC) (WLT) (IMU)

#### Index_Entries

       copy a character cell

#### Link to routine copy_c source file copy_c.c

    Wed Apr  5 17:54:30 2017