XPRS_nml_getnames
XPRS_nml_getnames |
int XPRS_CC XPRS_nml_getnames(XPRSnamelist nml, int padlen, char buf[], int buflen, int* r_buflen_reqd, int firstIndex, int lastIndex);
nml
|
The namelist object.
|
padlen
|
The minimum length of each name. If
>0 then names shorter than
padlen will be concatenated with whitespace to make them this length.
|
buf
|
Buffer of length
buflen into which the names shall be returned.
|
buflen
|
The maximum number of bytes that may be written to the character buffer
buf.
|
r_buflen_reqd
|
A pointer to a variable into which will be written the number of bytes required to contain the names. May be NULL if not required.
|
firstIndex
|
The index of the first name in the namelist to return. Note name list indexes always start from 0.
|
lastIndex
|
The index of the last name in the namelist to return.
|
XPRSnamelist mylist; char* cbuf; int o, i, cbuflen; ... /* Find out how much space we'll require for these names */ XPRS_nml_getnames(mylist, 0, NULL, 0, &cbuflen, 0, 5 ); /* Allocate a buffer large enough to hold the names */ cbuf = malloc(cbuflen); /* Retrieve the names */ XPRS_nml_getnames(mylist, 0, cbuf, cbuflen, NULL, 0, 5); /* Display the names */ o=0; for (i=0;i<6;i++) { printf("Name #%d = %s\n", i, cbuf+o); o += strlen(cbuf)+1; }
© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.