Arman Akbarian
UNIVERSITY OF BRITISH COLUMBIA
PHYSICS & ASTRONOMY DEPT.

#include <bbhutil.h>

void read_params(char *p_file,double *r, int *B)
{
   /******************************************
    * the parameter file must have the format:
    * param := value 
    ******************************************/
   get_param(p_file,"r","double",1,r);
   get_param(p_file,"B","long",1,B);
}

int main(int argc, char **argv) {
   double r;
   int B;
   char pfile[64];
   strcpy(pfile,argv[1]);
   read_params(pfile,&r,&B);
   printf("Read r = %f\n",r);
   printf("Read B = %d\n",B);
}


last update: Wed Aug 19, 2015