Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.stsci.edu/~sontag/spicedocs/cspice/ssize_c.html
Дата изменения: Sat Dec 17 06:09:54 2005 Дата индексирования: Sun Apr 10 23:27:48 2016 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п |
Set the size (maximum cardinality) of a CSPICE cell of any data type.
CELLS
VARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- size I Size (maximum cardinality) of the cell. cell O The cell.
size is the new value of the size (maximum number of elements) of the cell. size must be non-negative and must be no larger than the initial declared size of the cell. cell is a CSPICE cell of any data type.
cell is, on output, the cell with its size updated to the value given by the input argument size. The cardinality of the cell is set to 0. The cell becomes a CSPICE set: the cell's "is a set?" attribute becomes true. The cell then can be used as an input to the CSPICE set routines such as insrt*_c. Unlike the cell "set size" routines in the Fortran SPICE Toolkit's SPICELIB library, this routine does not clear the unused portion of the cell's control area.
None.
Unlike their counterparts in the Fortran SPICELIB library, CSPICE cells are initialized automatically when accessed via the CSPICE cell API routines, so there is normally no reason to call this routine. This routine is provided for the sake of completeness.
1) Declare an integer cell. Populate the cell, then reset the size to 1/2 the originally declared size, in order to inhibit write access to the last portion of the cell. #include "SpiceUsr.h" . . . #define SIZE 10 /. Declare a cell with room for SIZE integers. ./ SPICEINT_CELL ( icell, SIZE ); . . . /. Reduce the size of the cell. ./ ssize_c ( SIZE/2, &icell );
See exception #2 in the Exceptions section.
1) If an attempt is made to set the size of the cell to a negative number, the error SPICE(INVALIDSIZE) is signaled. 2) The size of a cell may not be set to a value larger than the original declared size. However, the CSPICE cell routines cannot detect this error.
None.
N.J. Bachman (JPL) C.A. Curzon (JPL) W.L. Taber (JPL) I.M. Underwood (JPL)
None.
-CSPICE Version 1.0.0, 21-AUG-2002 (NJB) (CAC) (WLT) (IMU)
set the size of a cell