#include #include #include /* Derived parameter stuff !! */ #define MAXDERIVED 200 extern double constants[]; extern int NCON; double evaluate(); typedef struct { int index,*form; char *rhs; double value; } DERIVED; DERIVED derived[MAXDERIVED]; int nderived=0; /* clean up derived stuff */ free_derived() { int i; for(i=0;i=MAXDERIVED){ printf(" Too many derived constants! \n"); return(1); } i0=nderived; derived[i0].rhs=(char *)malloc(n); /* save the right hand side */ strcpy(derived[i0].rhs,rhs); /* this is the constant to which it addresses */ derived[i0].index=NCON; /* add the name to the recognized symbols */ printf(" derived constant[%d] is %s = %s\n",NCON,name,rhs); nderived++; return(add_con(name,0.0)); }