[Top][All Lists]

[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);
                  value = sym->num;
               delete_symbol(mpl, sym);

Best regards

View this message in context:
Sent from the Gnu - GLPK - Help mailing list archive at

reply via email to

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