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

Required Reading


   CSPICE_GCPOOL returns the value of a string kernel variable
   (scalar or array) from the kernel pool.

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



      name     the scalar string name of a pool variable associated
               to string values.

      start    a scalar integer value for the index indicating the
               first component of the data vector assigned
               to 'name' for return (index 0 for all elements).

      room     the scalar integer specifying the maximum number of components
               that can return for 'name'.

      length   the scalar integer value describing the max length
               to allow for the data strings assigned to 'name'
               (if the output string is expected to have x
               characters, lenout needs to be x + 1 to accommodate a
               null terminator).

   the call:

      cspice_gcpool, name, start, room, length, cvals, found


      cvals   a string array of the values assigned to 'name' beginning
              at index 'start'.

      found   a scalar boolean that flags whether 'name' exists in
              the kernel pool and has character type.

              'cvals' has a size of 'room' or less.


   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.

      ;; Load a kernel containing the variable assignments:
      ;;   CTEST_VAL = ('LARRY', 'MOE', 'CURLY' )
      ;;   ITEST_VAL = ( 3141, 186, 282 )
      ;;   DTEST_VAL = ( 3.1415, 186. , 282.397 )
      cspice_furnsh, ''

      ;; Retrieve up-to 'ROOM' character entries for
      ;; kernel pool variable named 'CTEST_VAL' to
      ;; the array named 'cvals'. The first index to return,
      ;; 'START', has value 0 (this returns all strings).
      ;; Use a string length of 80.
      VAR    = 'CTEST_VAL'
      ROOM   = 25
      LENGTH = 81
      START  = 0

      cspice_gcpool, VAR, START, ROOM, LENGTH, cvals, found

      if (found) then begin
         print, 'Found ' + VAR + ' in the kernel pool'

         for i=0, n_elements(cvals)-1 do begin
            print, '   Element ' + string(i) + ' of ' + VAR + ': ', cvals[i]


      ;; Unload the test kernel.
      cspice_unload, 'pool_t.ptm'

   IDL outputs:

      Found CTEST_VAL in the kernel pool
         Element        0 of CTEST_VAL: LARRY
         Element        1 of CTEST_VAL: MOE
         Element        2 of CTEST_VAL: CURLY



Required Reading



   -Icy Version 1.0.3, 26-AUG-2016, EDW (JPL), JDR (ODC Space)

      Edit to example code. Typos in kernel names; "pool_t.ker"
      and "" rather than ""

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

      Minor edits to header text.

   -Icy Version 1.0.1, 03-JAN-2007, EDW (JPL)

      Edit to I/O section for 'room' and 'start' to improve clarity.

   -Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)


   RETURN the character value of a pooled kernel variable
   RETURN the string value of a pooled kernel variable

Wed Apr  5 17:58:01 2017