help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Printf overflow on glpsol using mathprog language


From: xypron
Subject: Re: [Help-glpk] Printf overflow on glpsol using mathprog language
Date: Wed, 18 Mar 2009 12:18:26 -0700 (PDT)

Hello Luiz,


Luiz Rossi de Souza wrote:
> 
> I need to increase the buffer glpk uses for the printf function of
> mathprog, so I won't be getting an overflow error.
> 

I guess you mean the error message
"resultant symbol exceeds 100 characters"

In include src/glpmpl.h you can find the following definition:

#define MAX_LENGTH 100
/* maximal length of any symbolic value (this includes symbolic names,
   numeric and string literals, and all symbolic values that may appear
   during the evaluation phase) */

Try to avoid concatenations in the printf statement.
Eg. replace
printf "abc" & "def";
by
printf "%s%s", "abc", "def";
or by
printf "abc"; printf "def";

Best regards

Xypron

-- 
View this message in context: 
http://www.nabble.com/Printf-overflow-on-glpsol-using-mathprog-language-tp22583819p22586542.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]