Purpose
Synopsis
const char *XPRBnewname(const char *format, ...);
Arguments
format
|
String indicating the printing format using standard C conventions (see the documentation of printf in a C manual for a complete list of format options). Simple formating options are of the form %n where n may be, for instance, one of
c
|
single character;
|
d
|
integer;
|
g
|
double;
|
s
|
string of characters.
|
|
...
|
items composing the name string according to the format specification in the format string; separated by commas.
|
Return value
String of characters.
Example
This example finds the variable with name xab15.
XPRBprob prob;
char a[] = "ab";
int i = 15;
XPRBvar x1;
...
x1 = XPRBgetbyname(prob, XPRBnewname("x%s%d",a,i), XPRB_VAR);
Further information
1. This function simplifies the composition of names for BCL objects. It is intended to be used as a parameter of other functions
(wherever name strings are required). Unlike the standard C string functions, this function does not require any memory allocation
by the user, and the string returned must not be freed by the user.
2. Names created with this function are limited to 128 characters. However, there is no restriction on the length of names for
BCL objects in general.
Related topics
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.