# NAG CPP Interfacenagcpp::opt::nlp1_option_string (e04ue)

Settings help

CPP Name Style:

## 1Purpose

nlp1_option_string may be used to supply individual optional parameters to nlp1_​solve(_old)
nlp1_option_string can also be used to supply individual optional parameters to e04uff (no CPP interface).

## 2Specification

```#include "e04/nagcpp_e04ue.hpp"
#include "e04/nagcpp_class_CommE04WB.hpp"
```
```template <typename COMM>

void function nlp1_option_string(const string optstr, COMM &comm, OptionalE04UE opt)```
```template <typename COMM>

void function nlp1_option_string(const string optstr, COMM &comm)```

## 3Description

nlp1_option_string may be used to supply values for optional parameters to nlp1_​solve(_old). It is only necessary to call nlp1_option_string for those arguments whose values are to be different from their default values. One call to nlp1_option_string sets one argument value.
Each optional parameter is defined by a single character string, of up to $72$ characters, consisting of one or more items. The items associated with a given option must be separated by spaces, or equals signs $\left[=\right]$. Alphabetic characters may be upper or lower case. The string
`Print Level = 1`
is an example of a string used to set an optional parameter. For each option the string contains one or more of the following items:
• a mandatory keyword;
• a phrase that qualifies the keyword;
• a number that specifies an integer or real value. Such numbers may be up to $40$ contiguous characters in Fortran's I, F, E or D formats, terminated by a space if this is not the last item on the line.
Blank strings and comments are ignored. A comment begins with an asterisk (*) and all subsequent characters in the string are regarded as part of the comment.
Printing of user-specified options is turned off by default. It may be turned on at any time using the keyword List.
Optional parameter settings are preserved following a call to nlp1_​solve(_old) and so the keyword Defaults is provided to allow you to reset all the optional parameters to their default values before a subsequent call to nlp1_​solve(_old).
A complete list of optional parameters, their abbreviations, synonyms and default values is given in Section 12 in nlp1_​solve(_old).

None.

## 5Arguments

1: $\mathbf{optstr}$string Input
On entry: a single valid option string (as described in Section 3 and in Section 12 in nlp1_​solve(_old)).
2: $\mathbf{comm}$CommE04WB Input/Output
Communication structure. This argument must have been initialized by a prior call to init (no CPP interface).
3: $\mathbf{opt}$OptionalE04UE Input/Output
Optional parameter container, derived from Optional.

## 6Exceptions and Warnings

All errors and warnings have an associated numeric error code field, errorid, stored either as a member of the thrown exception object (see errorid), or as a member of opt.ifail, depending on how errors and warnings are being handled (see Error Handling for more details).
Raises: ErrorException
$\mathbf{errorid}=5$
The supplied option string is invalid. Supplied value was:
$⟨\mathit{\text{value}}⟩$.
$\mathbf{errorid}=10605$
On entry, the communication class $⟨\mathit{\text{value}}⟩$ has not been initialized correctly.
$\mathbf{errorid}=10703$
An exception was thrown during IO (writing).
$\mathbf{errorid}=-99$
An unexpected error has been triggered by this routine.
$\mathbf{errorid}=-399$
Your licence key may have expired or may not have been installed correctly.
$\mathbf{errorid}=-999$
Dynamic memory allocation failed.

Not applicable.

## 8Parallelism and Performance

Please see the description for the underlying computational routine in this section of the FL Interface documentation.