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.
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.
cspice_scard, card, cell
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
The user must create 'cell' using either cspice_celld
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
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 )
Cardinality of cell, initial: 0
Cardinality of cell, filled : 6
Cardinality of cell, reset : 0
-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
-Icy Version 1.0.0, 12-SEP-2004, EDW (JPL)
set the cardinality of an integer cell