void dtpool_c ( ConstSpiceChar * name,
SpiceBoolean * found,
SpiceInt * n,
SpiceChar type [1] )
Return the data about a kernel pool variable.
KERNEL
CONSTANTS
FILES
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
name I Name of the variable whose value is to be returned.
found O True if variable is in pool.
n O Number of values returned for name.
type O Type of the variable: 'C', 'N', or 'X'
name is the name of the variable whose values are to be
returned.
found is SPICETRUE if the variable is in the pool;
SPICEFALSE if it is not.
n is the number of values associated with name.
If name is not present in the pool n will be returned
with the value 0.
type is a single character indicating the type of the variable
associated with name.
'C' if the data is character data
'N' if the data is numeric.
'X' if there is no variable name in the pool.
None.
1) If the name requested is not in the kernel pool, found
will be set to SPICEFALSE, n to zero and type to 'X'.
2) If the input string pointer is null, the error SPICE(NULLPOINTER)
will be signaled.
3) If the input string has length zero, the error SPICE(EMPTYSTRING)
will be signaled.
None.
This routine allows you to determine whether or not a kernel
pool variable is present and to determine its size and type
if it is.
The following code fragment demonstrates how to determine the
properties of a stored kernel variable.
#include <stdio.h>
#include "SpiceUsr.h"
.
.
.
dtpool_c ( varnam, &found, &n, &type );
if ( found )
{
printf ( "\n"
"Properties of variable %s:\n"
"\n"
" Size: %d\n",
varnam,
n );
if ( type == 'C' )
{
printf ( " Type: Character\n" );
}
else
{
printf ( " Type: Numeric\n" );
}
}
else
{
printf ( "%s is not present in the kernel pool.\n", varnam );
}
None.
None.
W.L. Taber (JPL)
-CSPICE Version 1.1.0, 17-OCT-1999 (NJB)
Local type logical variable now used for found flag used in
interface of dtpool_.
-CSPICE Version 1.0.0, 10-MAR-1999 (NJB)
return summary information about a kernel pool variable
Link to routine dtpool_c source file dtpool_c.c
|