[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Error line in GMPL files
From: |
glpk xypron |
Subject: |
[Help-glpk] Error line in GMPL files |
Date: |
Wed, 23 Feb 2011 22:45:10 +0100 |
Hello Andrew,
the GLPK library provides functions to read and generate GMPL models.
If an error occurs this is indicated by the return code. I would like
to use the error line to set the cursor in an editor window and mark
the problematic line.
See screnshot of example application provided by GLPK for Java:
http://screenshots.debian.net/screenshots/l/libglpk-java/5066_large.png
Unfortunately structure glp_tran has been defined as opaque substitute
for struct MPL.
For embeddding GLPK into an editor or IDE it would be useful
to provide a function that would take a glp_tran structure as an input
and return the error file, error line, error message, error context,
e.g.
void glp_mpl_error_get(glp_tran *tran, char **file, int *line,
char **message, char **context)
Some change in glpmpl04.c, function error will be necessary, because
information is lost when mpl->phase is set to 4 and the function is
left You might copy the necessary information to mpl->line and
mpl->in_file in the error function if mpl->phase = 3, and save the
variable msg in a new pointer or in mpl->mpl_buf. mpl->context should
be set to null if mpl->phase = 3.
Best regards
Xypron
--
Schon gehört? GMX hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://www.gmx.net/de/go/toolbar
- [Help-glpk] Error line in GMPL files,
glpk xypron <=