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

Procedure
Abstract
Required_Reading
Keywords
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version
Index_Entries

Procedure

   void dascls_c ( SpiceInt handle ) 

Abstract

 
   Close a DAS file. 
 

Required_Reading

 
   DAS 
 

Keywords

 
   DAS 
   FILES 
 

Brief_I/O

 
   Variable  I/O  Description 
   --------  ---  -------------------------------------------------- 
   handle     I   Handle of an open DAS file. 
   FTSIZE     P   Maximum number of simultaneously open DAS files. 
 

Detailed_Input

 
   handle         is the file handle of an open DAS file. 
 

Detailed_Output

 
   None.  See $Particulars for a description of the effect of this 
   routine. 
 

Parameters

 
   FTSIZE         is the maximum number of DAS files that can be 
                  open at any one time.  See the file dasfm.c
                  for details.
 

Exceptions

 
   Error free. 
 
   1)  If `handle' is not the handle of an open DAS file, no error 
       is signaled. 
 

Files

 
   See the description of input argument `handle' in $Detailed_Input. 
 

Particulars

 
   This routine provides the primary recommended method of closing an
   open DAS file.  It is also possible to close a DAS file without
   segregating it by calling daswbr_ and dasllc_. Closing a DAS file by
   any other means may cause the DAS mechanism for keeping track of
   which files are open to fail.  Closing a DAS file that has been
   opened for writing by any other means may result in the production
   of something other than a DAS file.
 

Examples

 
   1)  Open a new DAS file called TEST.DAS, add 100 d.p. numbers 
       to it, and then close the file. 
 
          #include "SpiceUsr.h"
          #include "SpiceZfc.h"
          #include <string.h>

          int main()
          {
             #define  NMAX           100 

             SpiceChar             * fname;
             SpiceChar             * ftype;
             SpiceChar             * ifname;

             SpiceDouble             ddata  [ NMAX ];

             SpiceInt                handle;
             SpiceInt                i;
             SpiceInt                n;
             SpiceInt                ncomch;


             /.
             We'll give the file the same internal file name
             as the file's actual name.  We don't require any
             comment records.
             ./
             fname  = "TEST.DAS";
             ftype  = "TEST";
             ifname = fname;
             ncomch = 0;

             dasonw_ ( (SpiceChar *) fname,
                       (SpiceChar *) ftype,
                       (SpiceChar *) ifname,
                       (integer   *) &ncomch,
                       (integer   *) &handle,
                       (ftnlen     ) strlen(fname),        
                       (ftnlen     ) strlen(ftype),        
                       (ftnlen     ) strlen(ifname)  );

    
             for ( i = 0;  i < NMAX;  i++ )
             {
                 ddata[i] = (SpiceDouble)i; 
             }

             n = NMAX;

             dasadd_ ( &handle, &n, ddata );

             dascls_c ( handle );

             return ( 0 );
          }       
          
    
 

Restrictions

 
   None. 
 

Literature_References

 
   None. 
 

Author_and_Institution

 
   N.J. Bachman   (JPL) 
   K.R. Gehringer (JPL) 
   W.L. Taber     (JPL) 
 

Version

 
   -CSPICE Version 1.0.0, 05-OCT-2006 (NJB) (KRG) (WLT)

Index_Entries

 
   close a DAS file 
 
Wed Apr  5 17:54:31 2017