# NAG CL Interfacee05zlc (optget)

Settings help

CL Name Style:

## 1Purpose

e05zlc is used to query the value of optional parameters available to supported problem solving functions in Chapter E05. Currently the following functions are supported:

## 2Specification

 #include
 void e05zlc (const char *optstr, Integer *ivalue, double *rvalue, char *cvalue, Integer lcvalue, Nag_VariableType *optype, const Integer iopts[], const double opts[], NagError *fail)
The function may be called by the names: e05zlc, nag_glopt_optget or nag_glopt_opt_get.

## 3Description

e05zlc is used to query the current values of options. It is necessary to initialize optional parameter arrays using e05zkc before any options are queried.
e05zlc will normally return either an integer, real or character value dependent upon the type associated with the optional parameter being queried. Some real and integer options also return additional information in cvalue. Whether the option queried is of integer, real or character type, and whether additional information is returned in cvalue, 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 e05sac, e05sbc, e05ucc and e05usc.

None.

## 5Arguments

1: $\mathbf{optstr}$const char * Input
On entry: a string identifying the option whose current value is required. See Section 12 in e05sac, e05sbc and e05ucc for information on valid options. In addition, the following is a valid option:
$\mathbf{Identify}$
e05zlc returns in cvalue the function name supplied to e05zkc when the optional parameter arrays iopts and opts were initialized.
2: $\mathbf{ivalue}$Integer * Output
On exit: if the optional parameter supplied in optstr is an integer valued parameter, ivalue will hold its current value.
3: $\mathbf{rvalue}$double * Output
On exit: if the optional parameter supplied in optstr is a real valued parameter, rvalue will hold its current value.
4: $\mathbf{cvalue}$char * Output
Note: the string returned in cvalue will never exceed $\mathrm{min}\phantom{\rule{0.125em}{0ex}}\left({\mathbf{lcvalue}},41\right)$ characters in length (including the null terminator).
On exit: if the optional parameter supplied in optstr is a character valued argument, cvalue will hold its current value. cvalue will also contain additional information for some integer and real valued parameters, as indicated by optype.
5: $\mathbf{lcvalue}$Integer Input
On entry: length of cvalue. At most ${\mathbf{lcvalue}}-1$ non-null characters will be written into cvalue.
Constraint: ${\mathbf{lcvalue}}>1$.
6: $\mathbf{optype}$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.
${\mathbf{optype}}=\mathrm{Nag_Integer}$
optstr is an integer valued optional parameter, its current value has been returned in ivalue.
${\mathbf{optype}}=\mathrm{Nag_Real}$
optstr is a real valued optional parameter, its current value has been returned in rvalue.
${\mathbf{optype}}=\mathrm{Nag_Character}$
optstr is a character valued optional parameter, its current value has been returned in cvalue.
${\mathbf{optype}}=\mathrm{Nag_Integer_Additional}$
optstr is an integer valued optional parameter, its current value has been returned in ivalue. Additional information has been returned in cvalue.
${\mathbf{optype}}=\mathrm{Nag_Real_Additional}$
optstr is a real valued optional parameter, its current value has been returned in rvalue. Additional information has been returned in cvalue.
7: $\mathbf{iopts}\left[\mathit{dim}\right]$const Integer Communication Array
Note: the dimension, $\mathit{dim}$, 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 e05zkc.
8: $\mathbf{opts}\left[\mathit{dim}\right]$const double Communication Array
Note: the dimension, $\mathit{dim}$, 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 e05zkc.
9: $\mathbf{fail}$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 $⟨\mathit{\text{value}}⟩$ had an illegal value.
NE_INT
On entry, ${\mathbf{lcvalue}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{lcvalue}}>1$.
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, the $\mathit{option}$ in optstr has not been recognized.
The arrays iopts and opts have either not been initialized, have become corrupted, or are not compatible with this option setting function.
NE_NO_LICENCE
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.

Not applicable.

## 8Parallelism and Performance

e05zlc is not threaded in any implementation.

## 9Further Comments

Some options have default values which are problem dependent. For example the option ${\mathbf{Maximum Iterations Completed}}$ for e05sac has the default value $1000×{\mathbf{ndim}}$. If options such as this are queried before being set, or before the problem solving function has been called, they will return misleading information in ivalue or rvalue. In some cases, the value of cvalue will be set to DEFAULT to indicate that the real or integer valued optional parameter supplied in optstr is at its default value.

## 10Example

See the example programs associated with the problem solving function you wish to use for a demonstration of how to use e05zlc to query options.