NAG Library Routine Document

g22zmf (optset)

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

1Purpose

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

2Specification

Fortran Interface
 Subroutine g22zmf (
 Integer, Intent (Inout) :: ifail Character (*), Intent (In) :: optstr Type (c_ptr), Intent (In) :: handle
#include <nagmk26.h>
 void g22zmf_ (void **handle, const char *optstr, Integer *ifail, const Charlen length_optstr)

3Description

g22zmf 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 routine documents.

None.

5Arguments

1:     $\mathbf{handle}$ – Type (c_ptr)Input
On entry: the G22 handle which must have been initialized by one of Chapter G22's initialization routines.
2:     $\mathbf{optstr}$ – Character(*)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 option to optval.
$\mathit{option}:\mathit{instance identifier}=\mathit{optval}$
Sets a single instance of option to optval.
$\mathit{option}=\mathbf{default}$
Resets (all instances) of option to their default value.
$\mathit{option}:\mathit{instance identifier}=\mathbf{default}$
Resets a single instance of option to its default value.
optstr is case insensitive and option, instance identifier and optval may consist of one or more tokens separated by white space.
See the documentation of the individual routines in the G22 Chapter Introduction for details of valid values for option, instance identifier and optval.
3:     $\mathbf{ifail}$ – IntegerInput/Output
On entry: ifail must be set to $0$, . If you are unfamiliar with this argument you should refer to Section 3.4 in How to Use the NAG Library and its Documentation for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value  is recommended. If the output of error messages is undesirable, then the value $1$ is recommended. Otherwise, if you are not familiar with this argument, the recommended value is $0$. When the value  is used it is essential to test the value of ifail on exit.
On exit: ${\mathbf{ifail}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see Section 6).

6Error Indicators and Warnings

If on entry ${\mathbf{ifail}}=0$ or $-1$, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
${\mathbf{ifail}}=11$
handle has not been initialized or is corrupt.
${\mathbf{ifail}}=12$
handle is not a G22 handle.
${\mathbf{ifail}}=21$
On entry, option was not recognized.
${\mathbf{optstr}}=〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=22$
On entry, the expected delimiter ‘$=$’ was not found.
${\mathbf{optstr}}=〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=23$
On entry, option is read only.
${\mathbf{optstr}}=〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=24$
On entry, could not convert optval to an integer.
${\mathbf{optstr}}=〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=25$
On entry, could not convert optval to a real.
${\mathbf{optstr}}=〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=26$
On entry, optval is not a valid value for option.
${\mathbf{optstr}}=〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=121$
Invalid instance identifier for option.
On entry, ${\mathbf{optstr}}=〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=122$
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}}〉$.
${\mathbf{ifail}}=123$
On entry, option cannot have an associated instance identifier. The supplied instance identifier was ignored.
${\mathbf{optstr}}=〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=-99$
See Section 3.9 in How to Use the NAG Library and its Documentation for further information.
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
See Section 3.8 in How to Use the NAG Library and its Documentation for further information.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 3.7 in How to Use the NAG Library and its Documentation for further information.

Not applicable.

8Parallelism and Performance

g22zmf is not threaded in any implementation.