| dafhsf | 
| Table of contents Procedure
     DAFHSF ( DAF, handle to summary format )
     ENTRY DAFHSF ( HANDLE, ND, NI )
Abstract
     Return the summary format associated with a handle.
Required_Reading
     DAF
Keywords
     CONVERSION
     DAF
     FILES
Declarations
    INTEGER               HANDLE
    INTEGER               ND
    INTEGER               NI
Brief_I/O
     VARIABLE  I/O  DESCRIPTION
     --------  ---  --------------------------------------------------
     HANDLE     I   Handle of a DAF file.
     ND         O   Number of double precision components in summaries.
     NI         O   Number of integer components in summaries.
Detailed_Input
     HANDLE   is the handle associated with a previously opened
              DAF file.
Detailed_Output
     ND,
     NI       are the numbers of double precision and integer
              components, respectively, in each array summary
              in the specified file.
Parameters
     None.
Exceptions
     1)  If the specified handle does not belong to any file that is
         currently known to be open, the error SPICE(DAFNOSUCHHANDLE)
         is signaled.
Files
     None.
Particulars
     The summary format must be known in order to pack or unpack
     an array summary. See the DAF Required Reading for a discussion
     of summary formats.
Examples
     The numerical results shown for this example may differ across
     platforms. The results depend on the SPICE kernels used as
     input, the compiler and supporting libraries, and the machine
     specific arithmetic implementation.
     1) Find the number of d.p. `words' in a DAF having an
        arbitrary summary format.
        Use the SPK kernel below as input DAF file for the program.
           de421.bsp
        Example code begins here.
              PROGRAM DAFHSF_EX1
              IMPLICIT NONE
        C
        C     Count the number of d.p. words of data in a
        C     DAF.  Exclude array summaries, reserved records,
        C     the file record, and character records.
        C
              INTEGER               FILEN
              PARAMETER           ( FILEN  = 128 )
              INTEGER               MAXND
              PARAMETER           ( MAXND  = 124 )
              INTEGER               MAXNI
              PARAMETER           ( MAXNI  = 250 )
              INTEGER               MAXSUM
              PARAMETER           ( MAXSUM = 125 )
        C
        C     Local variables.
        C
              CHARACTER*(FILEN)     DAF
              DOUBLE PRECISION      DC    ( MAXND  )
              DOUBLE PRECISION      SUM   ( MAXSUM )
              INTEGER               FA
              INTEGER               HANDLE
              INTEGER               IA
              INTEGER               IC    ( MAXNI )
              INTEGER               N
              INTEGER               ND
              INTEGER               NI
              LOGICAL               FOUND
              DAF = 'de421.bsp'
        C
        C     Open the DAF and find the summary format.
        C
              CALL DAFOPR ( DAF,    HANDLE )
              CALL DAFHSF ( HANDLE, ND, NI )
        C
        C     Start a forward search and examine each array in
        C     turn.
        C
              CALL DAFBFS ( HANDLE )
              CALL DAFFNA ( FOUND  )
              N = 0
              DO WHILE ( FOUND )
        C
        C        Obtain the array summary, unpack it, and get
        C        the initial and final array addresses from
        C        the integer descriptor component.
        C
                 CALL DAFGS ( SUM )
                 CALL DAFUS ( SUM, ND, NI, DC, IC )
                 IA  =  IC ( NI - 1 )
                 FA  =  IC ( NI     )
                 N   =  FA - IA + 1 + N
                 CALL DAFFNA ( FOUND )
              END DO
              WRITE (*,*) 'Number of d.p. words is ', N
              END
        When this program was executed on a Mac/Intel/gfortran/64-bit
        platform, the output was:
         Number of d.p. words is      2098004
Restrictions
     None.
Literature_References
     None.
Author_and_Institution
     N.J. Bachman       (JPL)
     J. Diaz del Rio    (ODC Space)
     K.R. Gehringer     (JPL)
     H.A. Neilan        (JPL)
     W.L. Taber         (JPL)
     F.S. Turner        (JPL)
     I.M. Underwood     (JPL)
     E.D. Wright        (JPL)
Version
    SPICELIB Version 8.0.2, 25-NOV-2021 (JDR)
        Edited the header to comply with NAIF standard. Changed example
        code to hardcode the DAF file used as input.
    SPICELIB Version 8.0.1, 10-OCT-2012 (EDW)
        Corrected ordering of header section.
        Removed the obsolete Reference citation to "NAIF
        Document 167.0."
    SPICELIB Version 8.0.0, 13-NOV-2001 (FST)
        This routine was updated to utilize the new handle manager
        software to manage binary file formats and consolidated
        I/O code.
    SPICELIB Version 7.0.4, 08-OCT-1999 (WLT)
        The environment lines were expanded so that the supported
        environments are now explicitly given. New
        environments are WIN-NT
    SPICELIB Version 7.0.3, 16-SEP-1999 (NJB)
        CSPICE environments were added. Some typos were corrected.
    SPICELIB Version 7.0.2, 28-JUL-1999 (WLT)
        The environment lines were expanded so that the supported
        environments are now explicitly given. New
        environments are PC-DIGITAL, SGI-O32 and SGI-N32.
    SPICELIB Version 7.0.1, 17-MAR-1999 (WLT)
        The environment lines were expanded so that the supported
        environments are now explicitly given. Previously,
        environments such as SUN-SUNOS and SUN-SOLARIS were implied
        by the environment label SUN.
    SPICELIB Version 1.0.4, 29-SEP-1993 (KRG)
        Removed references to specific DAF file open routines in the
        $Detailed_Input section of the header. This was done in order
        to minimize documentation changes if these open routines ever
        change.
    SPICELIB Version 1.0.3, 10-MAR-1992 (WLT)
        Comment section for permuted index source lines was added
        following the header.
    SPICELIB Version 1.0.2, 03-SEP-1990 (NJB)
        Example added to the $Examples section.
    SPICELIB Version 1.0.1, 22-MAR-1990 (HAN)
        Literature references added to the header.
    SPICELIB Version 1.0.0, 31-JAN-1990 (IMU) | 
Fri Dec 31 18:36:08 2021