XSLPchgcvar
PurposeAdd or change the value of the character string corresponding to an SLP character variableSynopsisint XPRS_CC XSLPchgcvar(XSLPprob Prob, int nSLPCVar, char *cValue);Arguments
Prob The current SLP problem. nSLPCVar The index of the character variable being changed. An index of zero will create a new variable. cValue Character buffer holding the value of the character variable (not its name, which is created by XSLPaddnames if required).ExampleAssuming that character variable 7 has already been created, the following example changes its value to "new value" and creates a new character variable called BoxName with the value "Jewel box"XSLPchgcvar(Prob,7,"new value"); XSLPchgcvar(Prob,0,"Jewel box"); XSLPgetintattrib(Prob,XSLP_CVS,&n); XSLPaddnames(Prob,XSLP_CVNAMES,"BoxName",n,n);Integer attribute XSLP_CVS holds the number of character variables in the problem.Further informationCharacter variables can be used in formulae instead of strings, and are required in certain cases where the strings contain embedded spaces.Related topics
If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.