#1518: Parameter parser and CCTK_ParameterSet interpret leading zeros in numbers differently ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: sbrandt Type: defect | Status: reopened Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: ---------------------+------------------------------------------------------
Comment (by sbrandt):
OK, this is long overdue, but I replaced the expression evaluator with Piraha.
One new feature, which I can take out if no one likes it, is that you can set temporaries in an evaluation. Thus, if you do this:
{{{ uExpressionValue result;
cctk_PirahaEval("$a=4+4"); result = cctk_PirahaEval("$x=3+$a*2");
if(result.type == ival) { printf("result=%d\n",result.value.ival); } else if(result.type == rval) { printf("result=%g\n",result.value.rval); } }}}
You'll get "result=19." See the patch.