<?xml-stylesheet type="text/xsl" href="../styles/pmathml.xsl"?>
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:dsi="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xml:space="preserve"><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"/><title>E04NLF/E04NLA : NAG Library, Mark 22</title><link rel="stylesheet" href="../styles/libdoc.css" type="text/css"/><script type="text/javascript">
   function showLevel(_levelId){
    var thisLevel = document.getElementById(_levelId);
    var thisplus = document.getElementById( _levelId.concat('plus'));
    var thisminus = document.getElementById( _levelId.concat('minus'));
    if(thisLevel.style.display != "block"){
     thisLevel.style.display = "block";
     thisplus.style.display = "none";
     thisminus.style.display = "inline";
     }
    else{
     thisLevel.style.display = "none";
     thisminus.style.display = "none";
     thisplus.style.display = "inline";
     }
    }
  </script></head><body><hr/><div><a class="rout" href="../../pdf/E04/e04nlf.pdf">E04NLF/E04NLA (PDF version)</a></div><div><a class="chap" href="e04conts.xml">E04 Chapter Contents</a></div><div><a class="chapint" href="e04intro.xml">E04 Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div><hr/><h1 class="libdoc">NAG Library Routine Document<br/><br/>E04NLF/E04NLA</h1><div class="paramtext"><div class="header"><b>Note:</b>&#160; before using this routine, please read the Users' Note for your implementation to check the interpretation of <span class="bitalic">bold italicised</span> terms and other implementation-dependent details.</div></div> 
<div class="htmltoc">
<h2 class="htmltoc"><span class="htmltochead" onclick="showLevel('htmltoc');"><span class="htmltocplus" id="htmltocplus">+</span><span class="htmltocminus" id="htmltocminus">&#8722;</span></span>&#160;Contents</h2>
<div class="htmltocitem" id="htmltoc">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#purpose">1&#160;&#160;<b>Purpose</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocspecification');"><span class="htmltocplus" id="tocspecificationplus">+</span><span class="htmltocminus" id="tocspecificationminus">&#8722;</span></span>
<a class="htmltoc" href="#specification">2&#160;&#160;<b>Specification</b></a>
<div class="htmltocitem" id="tocspecification">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#routFspec">2.1&#160;&#160;<b>Specification for E04NLF</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#routAspec">2.2&#160;&#160;<b>Specification for E04NLA</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#description">3&#160;&#160;<b>Description</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#references">4&#160;&#160;<b>References</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#parameters">5&#160;&#160;<b>Parameters</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#errors">6&#160;&#160;<b>Error Indicators and Warnings</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#accuracy">7&#160;&#160;<b>Accuracy</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments">8&#160;&#160;<b>Further Comments</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocexample');"><span class="htmltocplus" id="tocexampleplus">+</span><span class="htmltocminus" id="tocexampleminus">&#8722;</span></span>
<a class="htmltoc" href="#example">9&#160;&#160;<b>Example</b></a>
<div class="htmltocitem" id="tocexample">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examtext">9.1&#160;&#160;<b>Program Text</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examdata">9.2&#160;&#160;<b>Program Data</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examresults">9.3&#160;&#160;<b>Program Results</b></a>
</div>
</div>
</div>
</div>
</div><h2 class="standard"><a class="sec" name="purpose" id="purpose"/>1&#160;&#160;Purpose</h2>
<div class="paramtext">To supply optional parameters to <a class="rout" href="../E04/e04nkf.xml">E04NKF/E04NKA</a> from an external file.  More precisely, E04NLF must be used to supply optional parameters to <a class="rout" href="../E04/e04nkf.xml">E04NKF</a> and E04NLA must be used to supply optional parameters to <a class="rout" href="../E04/e04nkf.xml">E04NKA</a>.</div>
<div class="paramtext">E04NLA is a version of E04NLF that has additional parameters in order to make it safe for use in multithreaded applications (see <a class="sec" href="#parameters">Section 5</a>).  The initialization routine <a class="rout" href="../E04/e04wbf.xml">E04WBF</a> <b>must</b> have been called before calling E04NLA.</div><h2 class="standard"><a class="sec" name="specification" id="specification"/>2&#160;&#160;Specification</h2><h3 class="standard"><a class="sec" name="routFspec" id="routFspec"/>2.1&#160;&#160;Specification for E04NLF</h3>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;E04NLF&#160;(</td><td class="tdfspec2"><a class="arg" href="#IOPTNS">IOPTNS</a>, <a class="arg" href="#INFORM">INFORM</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">IOPTNS, INFORM</td></tr></table><h3 class="standard"><a class="sec" name="routAspec" id="routAspec"/>2.2&#160;&#160;Specification for E04NLA</h3>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;E04NLA&#160;(</td><td class="tdfspec2"><a class="arg" href="#IOPTNS">IOPTNS</a>, <a class="arg" href="#LWSAV">LWSAV</a>, <a class="arg" href="#IWSAV">IWSAV</a>, <a class="arg" href="#RWSAV">RWSAV</a>, <a class="arg" href="#INFORM">INFORM</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">IOPTNS, IWSAV(380), INFORM</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">RWSAV(285)</td></tr><tr><td class="tdfspec1">LOGICAL</td><td class="tdfspec2">LWSAV(20)</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">E04NLF/E04NLA may be used to supply values for optional parameters to

<a class="rout" href="../E04/e04nkf.xml">E04NKF/E04NKA</a>.  E04NLF/E04NLA reads an external file and each line of the file defines a single optional parameter.  It is only necessary to supply values for those parameters whose values are to be different from their default values.</div><div class="paramtext">
Each optional parameter is defined by a single character string, 
of up to <m:math><m:mn>72</m:mn></m:math>&#160;characters, 
consisting of one or more items.  The items associated with a given option must be separated by spaces, or equals signs <m:math><m:mfenced open="[" close="]" separators=""><m:mo>=</m:mo></m:mfenced></m:math>.  Alphabetic characters may be upper or lower case.  The string 
<pre class="verbatim">Print Level = 1</pre> 
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:
<table class="standard-100"><tr>
<td style="width:1.2em;" valign="baseline">&#8211;</td>
<td valign="top">a mandatory keyword;</td>
</tr><tr>
<td style="width:1.2em;" valign="baseline">&#8211;</td>
<td valign="top">a phrase that qualifies the keyword;</td>
</tr><tr>
<td style="width:1.2em;" valign="baseline">&#8211;</td>
<td valign="top">a number that specifies an INTEGER or <span class="bitalic">double precision</span> value.  Such numbers may be up to <m:math><m:mn>16</m:mn></m:math>&#160;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.</td>
</tr></table>
</div><div class="paramtext">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.</div><div class="paramtext">The file containing the options must start with <span class="mono">Begin</span> and must finish with <span class="mono">End</span>.  An example of a valid options file is:
<pre class="verbatim">
Begin * Example options file 
   Print level = 5 
End
</pre>
</div>
<div class="paramtext">For E04NLF each line of the file is normally printed as it is read, on the current advisory message unit (see <a class="rout" href="../X04/x04abf.xml">X04ABF</a>), but printing may be suppressed using the keyword <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04nkf.xml#optparam_nolist"><m:mi mathcolor="#800080;" mathvariant="bold">Nolist</m:mi></m:maction></m:math>.  To suppress printing of <span class="mono">Begin</span>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04nkf.xml#optparam_nolist"><m:mi mathcolor="#800080;" mathvariant="bold">Nolist</m:mi></m:maction></m:math>&#160;must be the first option supplied as in the file:
<pre class="verbatim">
Begin 
   Nolist 
   Print level = 5 
End
</pre>
</div>
<div class="paramtext">Printing will automatically be turned on again after a call to <a class="rout" href="../E04/e04nkf.xml">E04NKF</a> or E04NLF and may be turned on again at any time using the keyword <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04nkf.xml#optparam_list"><m:mi mathcolor="#800080;" mathvariant="bold">List</m:mi></m:maction></m:math>.</div><div class="paramtext">For E04NLA printing is turned off by default, but may be turned on at any time using the keyword <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04nkf.xml#optparam_list"><m:mi mathcolor="#800080;" mathvariant="bold">List</m:mi></m:maction></m:math>.</div>
<div class="paramtext">Optional parameter settings are preserved following a call to <a class="rout" href="../E04/e04nkf.xml">E04NKF/E04NKA</a> and so the keyword <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../E04/e04nkf.xml#optparam_defaults"><m:mi mathcolor="#800080;" mathvariant="bold">Defaults </m:mi></m:maction></m:math>&#160;is provided to allow you to reset all the optional parameters to their default values before a subsequent call to <a class="rout" href="../E04/e04nkf.xml">E04NKF/E04NKA</a>.</div><div class="paramtext">A complete list of optional parameters, their abbreviations, synonyms and default values is given in <a class="sec" href="../E04/e04nkf.xml#optparams">Section 11</a> in E04NKF/E04NKA.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2>
<div class="paramtext">None.</div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<dl><dt class="paramhead"><a name="IOPTNS" id="IOPTNS"/>1: &#160;&#160;&#8194; IOPTNS &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the unit number of the options file to be read.</div>
<div class="paramtext"><i>Constraint</i>:
  <m:math><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IOPTNS"><m:mi mathcolor="#EE0000" mathvariant="bold">IOPTNS</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>99</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="INFORM" id="INFORM"/>2: &#160;&#160;&#8194; INFORM &#8211; INTEGER<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><b>Note:</b> <span class="italic">for E04NLA, <a class="arg" href="#INFORM">INFORM</a> does not occur in this position in the parameter list.  See the additional parameters described below</span>.</div><div class="paramtext"><i>On exit</i>: contains zero if the options file has been successfully read and a <m:math><m:mtext>value</m:mtext><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>&#160;otherwise (see <a class="sec" href="#errors">Section 6</a>).</div></dd><dd class="note"><b>Note:</b> <span class="italic"> the following are additional parameters for specific use with E04NLA.  Users of E04NLF therefore need not read the remainder of this description</span>.</dd><dt class="paramhead"><a name="LWSAV" id="LWSAV"/>2: &#160;&#160;&#8194; LWSAV(<m:math><m:mn>20</m:mn></m:math>) &#8211; LOGICAL array<span class="pclass">Communication Array</span></dt><dt class="multi-paramhead"><a name="IWSAV" id="IWSAV"/>3: &#160;&#160;&#8194; IWSAV(<m:math><m:mn>380</m:mn></m:math>) &#8211; INTEGER array<span class="pclass">Communication Array</span></dt><dt class="multi-paramhead"><a name="RWSAV" id="RWSAV"/>4: &#160;&#160;&#8194; RWSAV(<m:math><m:mn>285</m:mn></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Communication Array</span></dt><dd><div class="paramtext">The arrays <a class="arg" href="#LWSAV">LWSAV</a>, <a class="arg" href="#IWSAV">IWSAV</a> and <a class="arg" href="#RWSAV">RWSAV</a> <b>must not</b> be altered between calls to any of the routines E04NLA, <a class="rout" href="../E04/e04nkf.xml">E04NKA</a>, <a class="rout" href="../E04/e04nmf.xml">E04NMA</a> or <a class="rout" href="../E04/e04wbf.xml">E04WBF</a>.</div></dd><dt class="paramhead"><a name="INFORM2" id="INFORM2"/>5: &#160;&#160;&#8194; INFORM &#8211; INTEGER<span class="pclass">Output</span></dt><dd><div class="paramtext"><b>Note:</b> see the parameter description for <a class="arg" href="#INFORM">INFORM</a> above.</div></dd></dl><h2 class="standard"><a class="sec" name="errors" id="errors"/>6&#160;&#160;Error Indicators and Warnings</h2>
<div class="paramtext">Errors or warnings detected by the routine:</div>
<dl class="ifail"><dt class="errorhead"><a name="IMeq1" id="IMeq1"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#INFORM"><m:mi mathcolor="#EE0000" mathvariant="bold">INFORM</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt><dd><div class="paramtext"><a class="arg" href="#IOPTNS">IOPTNS</a> is not in the range <m:math><m:mfenced separators="" open="[" close="]"><m:mn>0</m:mn><m:mo>,</m:mo><m:mn>99</m:mn></m:mfenced></m:math>.</div></dd></dl><dl class="ifail"><dt class="errorhead"><a name="IMeq2" id="IMeq2"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#INFORM"><m:mi mathcolor="#EE0000" mathvariant="bold">INFORM</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt><dd><div class="paramtext"><span class="mono">Begin</span> was found, but end-of-file was found before <span class="mono">End</span> was found.</div></dd></dl><dl class="ifail"><dt class="errorhead"><a name="IMeq3" id="IMeq3"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#INFORM"><m:mi mathcolor="#EE0000" mathvariant="bold">INFORM</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math></dt><dd><div class="paramtext">end-of-file was found before <span class="mono">Begin</span> was found.</div></dd></dl><dl class="ifail"><dt class="errorhead"><a name="IMeq4" id="IMeq4"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#INFORM"><m:mi mathcolor="#EE0000" mathvariant="bold">INFORM</m:mi></m:maction><m:mo>=</m:mo><m:mn>4</m:mn></m:math></dt><dd><div class="paramtext">Not used.</div></dd></dl><dl class="ifail"><dt class="errorhead"><a name="IMeq5" id="IMeq5"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#INFORM"><m:mi mathcolor="#EE0000" mathvariant="bold">INFORM</m:mi></m:maction><m:mo>=</m:mo><m:mn>5</m:mn></m:math></dt><dd><div class="paramtext">One or more lines of the options file is invalid.  Check that all keywords are neither ambiguous nor misspelt.</div></dd></dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">Not applicable.</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>
<div class="paramtext"><a class="rout" href="../E04/e04nmf.xml">E04NMF/E04NMA</a> may also be used to supply optional parameters to

<a class="rout" href="../E04/e04nkf.xml">E04NKF/E04NKA</a>.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">This example solves the same problem as the example for <a class="rout" href="../E04/e04nkf.xml">E04NKF/E04NKA</a>, but in addition illustrates the use of E04NLF/E04NLA and <a class="rout" href="../E04/e04nmf.xml">E04NMF/E04NMA</a> to set optional parameters for <a class="rout" href="../E04/e04nkf.xml">E04NKF/E04NKA</a>.</div><div class="paramtext">In this example the options file read by E04NLF/E04NLA is appended to the data file for the program (see <a class="sec" href="#examdata">Section 9.2</a>).  It would usually be more convenient in practice to keep the data file and the options file separate.</div><h3 class="standard"><a class="sec" name="examtext" id="examtext"/>9.1&#160;&#160;Program Text</h3>
<div class="paramtext"><b>Note:</b> <span class="italic">the following programs illustrate the use of E04NLF and E04NLA</span>.</div><p><a class="verbatimref" href="../../examples/source/e04nlfe.f">Program Text (e04nlfe.f)</a></p><p><a class="verbatimref" href="../../examples/source/e04nlae.f">Program Text (e04nlae.f)</a></p><h3 class="standard"><a class="sec" name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3>
<p><a class="verbatimref" href="../../examples/data/e04nlfe.d">Program&#160;Data (e04nlfe.d)</a></p><p><a class="verbatimref" href="../../examples/data/e04nlae.d">Program&#160;Data (e04nlae.d)</a></p><h3 class="standard"><a class="sec" name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3>
<p><a class="verbatimref" href="../../examples/baseresults/e04nlfe.r">Program Results (e04nlfe.r)</a></p><p><a class="verbatimref" href="../../examples/baseresults/e04nlae.r">Program Results (e04nlae.r)</a></p>
<hr/><div><a class="rout" href="../../pdf/E04/e04nlf.pdf">E04NLF/E04NLA (PDF version)</a></div><div><a class="chap" href="e04conts.xml">E04 Chapter Contents</a></div><div><a class="chapint" href="e04intro.xml">E04 Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div>
<div><hr/><a class="genint" href="../FRONTMATTER/copyright.xml">&#169; The Numerical Algorithms Group Ltd, Oxford, UK. 2009</a></div></body></html>
