NAG FL Interface
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 4 in How to Use the NAG Library for further information.

1 Purpose

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.

2 Specification

Fortran Interface
Subroutine g22zmf ( handle, optstr, ifail)
Integer, Intent (Inout) :: ifail
Character (*), Intent (In) :: optstr
Type (c_ptr), Intent (In) :: handle
C Header Interface
#include <nag.h>
void  g22zmf_ (void **handle, const char *optstr, Integer *ifail, const Charlen length_optstr)
The routine may be called by the names g22zmf or nagf_blgm_optset.

3 Description

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 ‘option=optval’; alphabetic characters can be supplied in either upper or lower case. 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 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 ‘option:instance identifier=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.

4 References

None.

5 Arguments

1: handle Type (c_ptr) Input
On entry: the G22 handle which must have been initialized by one of Chapter G22's initialization routines.
2: optstr Character(*) Input
On entry: a string identifying the option, its value and, where required, the instance identifier.
Defaults
Resets all options to their default values.
option=optval
Sets (all instances) of option to optval.
option:instance identifier=optval
Sets a single instance of option to optval.
option=default
Resets (all instances) of option to their default value.
option:instance identifier=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: ifail Integer Input/Output
On entry: ifail must be set to 0, -1 or 1. If you are unfamiliar with this argument you should refer to Section 4 in the Introduction to the NAG Library FL Interface for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value -1 or 1 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 -1 or 1 is used it is essential to test the value of ifail on exit.
On exit: ifail=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6 Error Indicators and Warnings

If on entry 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:
ifail=11
handle has not been initialized or is corrupt.
ifail=12
handle is not a G22 handle.
ifail=21
On entry, option was not recognized.
optstr=value.
ifail=22
On entry, the expected delimiter ‘=’ was not found.
optstr=value.
ifail=23
On entry, option is read only.
optstr=value.
ifail=24
On entry, could not convert optval to an integer.
optstr=value.
ifail=25
On entry, could not convert optval to a real.
optstr=value.
ifail=26
On entry, optval is not a valid value for option.
optstr=value.
ifail=121
Invalid instance identifier for option.
On entry, optstr=value.
ifail=122
Numeric instance identifier is out of range.
On entry, instance identifier=value.
Constraint: valueinstance identifier and instance identifiervalue.
ifail=123
On entry, option cannot have an associated instance identifier. The supplied instance identifier was ignored.
optstr=value.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
ifail=-399
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
ifail=-999
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

g22zmf is not threaded in any implementation.

9 Further Comments

None.

10 Example

See the example for g22yaf.