stage4/generate_c/generate_c.cc
changeset 631 1a4f5ce62962
parent 625 c0bda77b37a0
child 632 76c3d707ffa1
equal deleted inserted replaced
630:5250fbf20999 631:1a4f5ce62962
   351   
   351   
   352   interval_c *interval = dynamic_cast<interval_c *>(symbol);
   352   interval_c *interval = dynamic_cast<interval_c *>(symbol);
   353   duration_c *duration = dynamic_cast<duration_c *>(symbol);
   353   duration_c *duration = dynamic_cast<duration_c *>(symbol);
   354   
   354   
   355   if ((NULL == interval) && (NULL == duration)) ERROR;
   355   if ((NULL == interval) && (NULL == duration)) ERROR;
       
   356   	  {STAGE4_ERROR(symbol, symbol, "This type of interval value is not currently supported"); ERROR;}
   356 
   357 
   357   if (NULL != duration) {
   358   if (NULL != duration) {
   358     /* SYM_REF2(duration_c, neg, interval) */
   359     /* SYM_REF2(duration_c, neg, interval) */
   359     if (duration->neg != NULL)
   360     if (duration->neg != NULL)
   360       {STAGE4_ERROR(duration, duration, "Negative TIME literals are not currently supported"); ERROR;}
   361       {STAGE4_ERROR(duration, duration, "Negative TIME literals for interval are not currently supported"); ERROR;}
   361     return calculate_time(duration->interval);
   362     return calculate_time(duration->interval);
   362   }
   363   }
   363 
   364 
   364   if (NULL != interval) {
   365   if (NULL != interval) {
   365     /* SYM_REF5(interval_c, days, hours, minutes, seconds, milliseconds) */
   366     /* SYM_REF5(interval_c, days, hours, minutes, seconds, milliseconds) */