<no title> — CALCEPH - Fortran 2003 language 3.4.1 documentation

       USE, INTRINSIC :: ISO_C_BINDING
       use calceph
       implicit none
       integer res
       integer j, itarget, iframe
       real(C_DOUBLE) firsttime, lasttime
       TYPE(C_PTR) :: peph

    ! open the ephemeris file
       peph = calceph_open("example1.dat"//C_NULL_CHAR)
       if (C_ASSOCIATED(peph)) then

    ! print the list of orientation records
         do j=1, calceph_getorientrecordcount(peph)
           res = calceph_getorientrecordindex(peph,j,itarget, firsttime, lasttime, iframe)
           write (*,*) itarget, firsttime, lasttime, iframe
         enddo

         call calceph_close(peph)
       endif