version 1.9, 2000/10/23 16:22:57
|
version 1.10, 2001/06/01 18:09:04
|
Line 201 f_symbol_pow(ap,bp) Symbol *ap; Symbol *
|
Line 201 f_symbol_pow(ap,bp) Symbol *ap; Symbol *
|
double a, b; |
double a, b; |
int error = 0; |
int error = 0; |
|
|
cp = NULL; |
/*Even if we can't do it we need to return something*/ |
|
cp = (Symbol *)capa_malloc(sizeof(Symbol),1); |
|
cp->s_type = R_CONSTANT; |
|
cp->s_real = 0.0; |
switch(ap->s_type) { |
switch(ap->s_type) { |
case I_VAR: a = (double)(ap->s_int); |
case I_VAR: a = (double)(ap->s_int); |
break; |
break; |
Line 232 f_symbol_pow(ap,bp) Symbol *ap; Symbol *
|
Line 235 f_symbol_pow(ap,bp) Symbol *ap; Symbol *
|
error = 1; |
error = 1; |
} |
} |
if (!error) { |
if (!error) { |
|
printf("and trying"); |
cp = (Symbol *)capa_malloc(sizeof(Symbol),1); |
cp = (Symbol *)capa_malloc(sizeof(Symbol),1); |
cp->s_type = R_CONSTANT; |
cp->s_type = R_CONSTANT; |
cp->s_real = pow(a,b); |
cp->s_real = pow(a,b); |
|
} else { |
|
FormulaParseOK=0; |
} |
} |
return (cp); |
return (cp); |
} |
} |