XSLPgetformulatext
XSLPgetformulatext |
Purpose
Retrieve a single matrix formula in a character string.
Synopsis
int XPRS_CC XSLPgetformulatext(XSLPprob Prob, int RowIndex, char *Formula, int fLen);
Arguments
Prob
|
The current SLP problem.
|
RowIndex
|
Integer holding the row index for the formula.
|
Formula
|
Character buffer in which the formula will be placed in the same format as used for input from a file. The formula will be null terminated.
|
fLen
|
Maximum length of returned formula.
|
Return value
0
|
Normal return.
|
1
|
Formula is too long for the buffer and has been truncated.
|
other
|
Error.
|
Example
The following retrieves a formula in text form:
char Buffer[60]; double Factor; int Code; Code = XSLPgetformulatext(Prob, 2, Buffer, 60); switch (Code) { case 0: printf("\nFormula is %s",Buffer); break; case 1: printf("\nFormula is too long for the buffer"); break; default: printf("\nError accessing formula"); break; }
Further information
If the length of the formula would exceed fLen-1, the formula is truncated to the last token that will fit, and the (partial) formula is terminated with a null character.
Related topics
XSLPaddformulas,
XSLPchgformulatext,
XSLPchgformula,
XSLPloadformulas,
XSLPgetformularows,
XSLPgetformula,
XSLPdelformulas