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

    integer res, nvalue
    character(len=CALCEPH_MAX_CONSTANTVALUE, kind=C_CHAR) svalue
    character(len=CALCEPH_MAX_CONSTANTVALUE, kind=C_CHAR), allocatable :: mission_units
    TYPE(C_PTR) :: peph

    peph = calceph_open("example1.dat"//C_NULL_CHAR)
    if (C_ASSOCIATED(peph)) then
         ! get the number of values
         nvalue = calceph_getconstantss(peph, "MISSION_UNITS"//C_NULL_CHAR, svalue)
         ! fill the array
         allocate(mission_units(1:nvalue))
         res = calceph_getconstantvs(peph, "MISSION_UNITS"//C_NULL_CHAR, mission_units, nvalue)
         write(*,*) mission_units
         deallocate(mission_units)

        call calceph_close(peph)
     endif