help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Time conversion functions


From: xypron
Subject: Re: [Help-glpk] Time conversion functions
Date: Fri, 21 Nov 2008 01:54:54 -0800 (PST)

Hello Andrew,

>> Probably it would be reasonable to add two functions atoi and atod to
>> convert symbolic values to numeric ones.

The following patch in glpmpl03.c might be sufficient:

         case O_CVTNUM:
            /* conversion to numeric */
            {  SYMBOL *sym;
               sym = eval_symbolic(mpl, code->arg.arg.x);
               if (sym->str != NULL)
               {
//                error(mpl, "cannot convert %s to floating-point numbe"
//                   "r", format_symbol(mpl, sym));
                  value = atof(sym->str);
               }
               else
               {
                  value = sym->num;
               }
               delete_symbol(mpl, sym);
            }
            break;

Best regards

Xypron
-- 
View this message in context: 
http://www.nabble.com/Time-conversion-functions-tp20549985p20618114.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]