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

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_SCARD sets the cardinality of an Icy cell of any data type.

   For important details concerning this module's function, please refer to
   the CSPICE routine scard_c.

I/O

   
   Given:

      card   the scalar integer cardinality (number of elements)
             to assign to 'cell'. 

      cell   an Icy cell of any data type. 'cell' must be declared 
             as a double precision, or integer.

   the call:

      cspice_scard, card, cell
   
   returns:

      cell   on output, the cardinality of the 'cell' is 'card'.
             The data portion of 'cell' remains unchanged.

             If the cardinality is set to zero, the cell becomes an
             Icy set:  the cell's "is a set?" attribute becomes
             true.

             The user must create 'cell' using either cspice_celld 
             or cspice_celli.

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

      ;;
      ;; Set a size for the cell.
      ;;
      SIZE = 10

      ;;
      ;; Create an double precision cell of SIZE
      ;;
      cell = cspice_celld( SIZE )
      
      ;;
      ;; Output the cardinality of a new cell.
      ;;
      print, "Cardinality of cell, initial: ", cspice_card( cell )

      ;;
      ;; Define an array of intervals.
      ;;
      array = [ [ 1.d, 3.0], [ 7.0, 11.0], [23.0, 27.0] ]

      ;;
      ;; Insert data into the cell, creating a window.
      ;;
      for i=0,2 do begin
         cspice_wninsd, array[0,i], array[1,i], cell
      endfor

      print, "Cardinality of cell, filled : ", cspice_card( cell )

     ;;
     ;; Reset the cardinality to zero to free the SIZE elements.
     ;;
     cspice_scard, 0, cell

     print, "Cardinality of cell, reset  : ", cspice_card( cell )

  IDL outputs:
  
     Cardinality of cell, initial:   0
     Cardinality of cell, filled :   6
     Cardinality of cell, reset  :   0

Particulars


   None.

Required Reading


   ICY.REQ
   CELLS.REQ

Version



   -Icy Version 1.0.3, 08-AUG-2008, EDW (JPL)

      Minor edits to header text.

   -Icy Version 1.0.2, 28-SEP-2006, EDW (JPL)

      Corrections to English.

      Correct Required Reading citation CELL.REQ to CELLS.REQ.

   -Icy Version 1.0.1, 29-MAR-2006, EDW (JPL)

      Minor edits to I/O section for clarity and consistency with
      cspice_ssize descriptions.

   -Icy Version 1.0.0, 12-SEP-2004, EDW (JPL)

Index_Entries

 
   set the cardinality of an integer cell 
 



Wed Apr  5 17:58:03 2017