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
sizec

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

     SIZEC ( Size of a character cell )

     INTEGER FUNCTION SIZEC ( CELL )

Abstract

     Return the size (maximum cardinality) of a character cell.

Required_Reading

     CELLS

Keywords

     CELLS

Declarations

     IMPLICIT NONE

     INTEGER               LBCELL
     PARAMETER           ( LBCELL = -5 )

     CHARACTER*(*)      CELL   ( LBCELL:* )

Brief_I/O

     VARIABLE  I/O  DESCRIPTION
     --------  ---  --------------------------------------------------
     CELL       I   Input cell.

     The function returns the size of the input cell.

Detailed_Input

     CELL     is a cell.

Detailed_Output

     The function returns the size of (maximum number of elements in)
     the input cell.

Parameters

     None.

Exceptions

     1)  If the input array has invalid cardinality, the error
         SPICE(INVALIDCARDINALITY) is signaled. SIZEC returns
         an unspecified value in this case.

     2)  If the input array has invalid size, the error
         SPICE(INVALIDSIZE) is signaled. SIZEC returns
         an unspecified value in this case.

Files

     None.

Particulars

     None.

Examples

     The size (SIZE) functions are typically used in conjunction
     with the cardinality functions to predict (and subsequently
     avoid) overflows when manipulating cells. In the following
     example, SIZEI is used to determine whether the integer cell
     ORIGINAL can be safely copied into the integer cell SAVE before
     actually attempting the operation. (If ORIGINAL contains more
     elements than SAVE is capable of holding, then the operation
     will fail.)

           IF ( CARDI ( ORIGINAL ) .LE. SIZEI ( SAVE ) ) THEN
              CALL COPYI ( ORIGINAL, SAVE, ERROR )

           ELSE
            .
            .
           END DO

Restrictions

     None.

Literature_References

     None.

Author_and_Institution

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

Version

    SPICELIB Version 1.2.0, 12-AUG-2021 (JDR)

        Added IMPLICIT NONE statement.

        Edited the header to comply with NAIF standard.

    SPICELIB Version 1.1.0, 17-MAY-1994 (HAN)

        If the value of the function RETURN is .TRUE. upon execution of
        this module, this function is assigned a default value of
        either 0, 0.0D0, .FALSE., or blank depending on the type of the
        function.

    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:49 2021