[ET Trac] [Einstein Toolkit] #1518: Parameter parser and CCTK_ParameterSet interpret leading zeros in numbers differently

Einstein Toolkit trac-noreply at einsteintoolkit.org
Fri Jun 27 14:49:30 CDT 2014


#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.

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1518#comment:9>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list