integer res
real(8) AU
TYPE(C_PTR) :: peph

peph = calceph_open("example1.dat"//C_NULL_CHAR)
if (C_ASSOCIATED(peph)) then
     ! print the value of AU
     if (calceph_getconstant(peph, "AU"//C_NULL_CHAR, AU).eq.1) then
        write (*,*) "AU=", AU
    endif

    call calceph_close(peph)
 endif