# NAG CL Interfaceg22zmc (optset)

Note: please be advised that this function is classed as ‘experimental’ and its interface may be developed further in the future. Please see Section 4 in How to Use the NAG Library for further information.

Settings help

CL Name Style:

## 1Purpose

g22zmc is a general option setting function for functions in Chapter G22. It can set a single optional parameter or reset all of them to their default.

## 2Specification

 #include
 void g22zmc (void *handle, const char *optstr, NagError *fail)
The function may be called by the names: g22zmc or nag_blgm_optset.

## 3Description

g22zmc can only be called on G22 handles. Its purpose is to reset all optional parameters to their default values or set a single optional parameter to a user-supplied value.
Optional parameters and their values are, in general, presented as a character string of the form ‘$\mathit{option}=\mathit{optval}$’; alphabetic characters can be supplied in either upper or lower case. $\mathit{optval}$ will normally be either an integer, real or character value as defined in the description of the specific optional parameter. In addition, all optional parameters can take an $\mathit{optval}$ DEFAULT which resets the optional parameter to its default value.
In cases where an optional parameter may have multiple instances an instance identifier can be specified. This is presented using the form ‘$\mathit{option}:\mathit{instance identifier}=\mathit{optval}$’. In such cases, if the instance identifier is omitted, the value of all instances are changed.
Information relating to available option names, their corresponding valid values, whether the use of an instance identifier may be appropriate and what form it can take is given in the individual function documents.

None.

## 5Arguments

1: $\mathbf{handle}$void * Input
On entry: the G22 handle which must have been initialized by one of Chapter G22's initialization functions.
2: $\mathbf{optstr}$const char * Input
On entry: a string identifying the option, its value and, where required, the instance identifier.
$\mathbf{Defaults}$
Resets all options to their default values.
$\mathit{option}=\mathit{optval}$
Sets (all instances) of $\mathit{option}$ to $\mathit{optval}$.
$\mathit{option}:\mathit{instance identifier}=\mathit{optval}$
Sets a single instance of $\mathit{option}$ to $\mathit{optval}$.
$\mathit{option}=\mathbf{default}$
Resets (all instances) of $\mathit{option}$ to their default value.
$\mathit{option}:\mathit{instance identifier}=\mathbf{default}$
Resets a single instance of $\mathit{option}$ to its default value.
optstr is case insensitive and $\mathit{option}$, instance identifier and $\mathit{optval}$ may consist of one or more tokens separated by white space.
See the documentation of the individual functions in the G22 Chapter Introduction for details of valid values for $\mathit{option}$, instance identifier and $\mathit{optval}$.
3: $\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.
On entry, argument $⟨\mathit{\text{value}}⟩$ had an illegal value.
NE_HANDLE
handle has not been initialized or is corrupt.
handle is not a G22 handle.
NE_INSTANCE
Invalid instance identifier for $\mathit{option}$.
On entry, ${\mathbf{optstr}}=⟨\mathit{\text{value}}⟩$.
Numeric instance identifier is out of range.
On entry, $\mathit{instance identifier}=⟨\mathit{\text{value}}⟩$.
Constraint: $⟨\mathit{\text{value}}⟩\le \mathit{instance identifier}$ and $\mathit{instance identifier}\le ⟨\mathit{\text{value}}⟩$.
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_FORMAT
On entry, could not convert $\mathit{optval}$ to an integer.
${\mathbf{optstr}}=⟨\mathit{\text{value}}⟩$.
On entry, could not convert $\mathit{optval}$ to a real.
${\mathbf{optstr}}=⟨\mathit{\text{value}}⟩$.
On entry, the expected delimiter ‘$=$’ was not found.
${\mathbf{optstr}}=⟨\mathit{\text{value}}⟩$.
NE_INVALID_OPTION
On entry, $\mathit{option}$ was not recognized.
${\mathbf{optstr}}=⟨\mathit{\text{value}}⟩$.
NE_INVALID_VALUE
On entry, $\mathit{optval}$ is not a valid value for $\mathit{option}$.
${\mathbf{optstr}}=⟨\mathit{\text{value}}⟩$.
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.
NE_WRITE_ERROR
On entry, $\mathit{option}$ is read only.
${\mathbf{optstr}}=⟨\mathit{\text{value}}⟩$.
NW_INSTANCE
On entry, $\mathit{option}$ cannot have an associated instance identifier. The supplied instance identifier was ignored.
${\mathbf{optstr}}=⟨\mathit{\text{value}}⟩$.

Not applicable.

## 8Parallelism and Performance

g22zmc is not threaded in any implementation.