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

    integer res, nvalue
    real(8) svalue
    real(8), allocatable :: radii
    TYPE(C_PTR) :: peph

    peph = calceph_open("example1.dat"//C_NULL_CHAR)
    if (C_ASSOCIATED(peph)) then
         ! get the number of values
         nvalue = calceph_getconstantsd(peph, "BODY399_RADII"//C_NULL_CHAR, svalue)
         ! fill the array
         allocate(radii(1:nvalue))
         res = calceph_getconstantvd(peph, "BODY399_RADII"//C_NULL_CHAR, radii, nvalue)
         write(*,*) radii

        call calceph_close(peph)
     endif