g02zlc is used to query the value of optional parameters available to supported problem solving functions in Chapter G02. Currently, only g02qgc is supported.
The function may be called by the names: g02zlc, nag_correg_optget or nag_g02_opt_get.
3Description
g02zlc is used to query the current values of options. It is necessary to initalize optional parameter arrays using g02zkc before any options are queried.
g02zlc will normally return either an integer, real or character value dependent upon the type associated with the optional parameter being queried. Whether the option queried is of integer, real or character type is indicated by the returned value of optype.
Information on optional parameter names and whether these options are real, integer or character can be found in Section 12 in g02qgc.
4References
None.
5Arguments
1: – const char *Input
On entry: a string identifying the option whose current value is required. See Section 12 in g02qgc for information on valid options. In addition, the following is a valid option:
g02zlc returns in cvalue the function name supplied to g02zkc when the optional parameter arrays iopts and opts were initialized.
2: – Integer *Output
On exit: if the optional parameter supplied in optstr is an integer valued parameter, ivalue will hold its current value.
3: – double *Output
On exit: if the optional parameter supplied in optstr is a real valued parameter, rvalue will hold its current value.
4: – char *Output
Note: the string returned in cvalue will never exceed characters in length (including the null terminator).
On exit: if the optional parameter supplied in optstr is a character valued parameter, cvalue will hold its current value, unless Identify is specified, see optstr.
5: – IntegerInput
On entry: length of cvalue. At most non-null characters will be written into cvalue.
Constraint:
.
6: – Nag_VariableType *Output
On exit: indicates whether the optional parameter supplied in optstr is an integer, real or character valued parameter and hence which of ivalue, rvalue or cvalue holds the current value.
optstr is an integer valued optional parameter, its current value has been returned in ivalue.
optstr is a real valued optional parameter, its current value has been returned in rvalue.
optstr is a character valued optional parameter, its current value has been returned in cvalue.
7: – const IntegerCommunication Array
Note: the dimension, , of this array is dictated by the requirements of associated functions that must have been previously called. This array MUST be the same array passed as argument iopts in the previous call to g02zkc.
8: – const doubleCommunication Array
Note: the dimension, , of this array is dictated by the requirements of associated functions that must have been previously called. This array MUST be the same array passed as argument opts in the previous call to g02zkc.
9: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument had an illegal value.
NE_INT
On entry, .
Constraint: .
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_INVALID_OPTION
On entry, either the option arrays have not been initialized or they have been corrupted.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
NW_TRUNCATED
On entry, optstr indicates a character optional parameter, but cvalue is too short to hold the stored value. The returned value will be truncated.
7Accuracy
Not applicable.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
g02zlc is not threaded in any implementation.
9Further Comments
None.
10Example
See the example programs associated with the problem solving function you wish to use for a demonstration of how to use g02zlc to query options.