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

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_DAFOPW opens a DAF for subsequent write requests.

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

I/O


   Given:

      fname   the scalar string name of a DAF to open for read/write access.

   the call:

      cspice_dafopw, fname, handle

   returns:

      handle   scalar integer value other DAF routines use to refer to 'fname'.

   Use cspice_dafcls to close files opened by this routine.

Examples


   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.

      ;;
      ;;    Given an SPK with a comment section:
      ;;
      ;;      Body list
      ;;       1 MERCURY BARYCENTER
      ;;       2 VENUS BARYCENTER
      ;;       3 EARTH BARYCENTER
      ;;       4 MARS BARYCENTER
      ;;       5 JUPITER BARYCENTER
      ;;       6 SATURN BARYCENTER
      ;;       7 URANUS BARYCENTER
      ;;       8 NEPTUNE BARYCENTER
      ;;
      ;;             ...

      ;;
      ;; Define the SPK file from which to remove the comments section.
      ;;
      SPK = 'test.spk'

      ;;
      ;; Open for writing the 'SPK', return the corresponding
      ;; file handle to 'handle'.
      ;;
      cspice_dafopw, SPK, handle

      ;;
      ;; Remove the comments section from the DAF referred to by 'handle'.
      ;;
      cspice_dafdc, handle


      ;;
      ;; SAFELY close the file.
      ;;
      cspice_dafcls, handle

   Examine the 'SPK' comment after the cspice_dafdc call.

      $ commnt -r test.spk

      There were no comments in the file 'test.spk'.

Particulars


   Most DAFs require only read access. If you do not need to
   change the contents of a file, you should open it with cspice_dafopr.
   Use cspice_dafopw when you need to

      -- change (update) one or more summaries, names, or
         arrays within a file; or

      -- add new arrays to a file.

Required Reading


   ICY.REQ
   DAF.REQ

Version


   -Icy Version 1.0.1, 13-SEP-2012, EDW (JPL)

      Edits and clean up to header text.

   -Icy Version 1.0.0, 08-DEC-2004, EDW (JPL)

Index_Entries


   open existing DAF for write




Wed Apr  5 17:57:59 2017