<no title> — CALCEPH - C language 3.4.1 documentation

    int nvalue, k;
    double *radii;
    t_calcephbin *peph;

    /* open the ephemeris file */
    peph = calceph_open("example1.dat");
    if (peph)
    {
      /* get the number of values */
      int nvalue = calceph_getconstantvd(peph, "BODY399_RADII", NULL, 0);
      radii = (double*)malloc(sizeof(double)*nvalue);

      /* fill  the array radii */
      if (calceph_getconstantvd(peph, "BODY399_RADII", radii, nvalue))
      {
          for (k=0; k<nvalue; k++)
          printf("BODY399_RADII(%d)=%23.16E\n", k, radii[k]);
      }
      /* close the ephemeris file */
      calceph_close(peph);
    }