<?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>X04ABF : 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/X04/x04abf.pdf">X04ABF (PDF version)</a></div><div><a class="chap" href="x04conts.xml">X04 Chapter Contents</a></div><div><a class="chapint" href="x04intro.xml">X04 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/>X04ABF</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="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#specification">2&#160;&#160;<b>Specification</b></a>
</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">X04ABF returns the value of the current advisory message unit number, or sets the current advisory message unit number to a new value.</div><h2 class="standard"><a class="sec" name="specification" id="specification"/>2&#160;&#160;Specification</h2>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;X04ABF&#160;(</td><td class="tdfspec2"><a class="arg" href="#IFLAG">IFLAG</a>, <a class="arg" href="#NADV">NADV</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">IFLAG, NADV</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">X04ABF enables those library routines which output advisory messages to determine the number of the output unit to which the advisory messages are to be sent; in this case X04ABF is called with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFLAG"><m:mi mathcolor="#EE0000" mathvariant="bold">IFLAG</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>.  X04ABF may also be called with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFLAG"><m:mi mathcolor="#EE0000" mathvariant="bold">IFLAG</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;to set the unit number to a specified value.  Otherwise a default value (stated in the <a class="url" href="http://www.nag.co.uk/doc/inun/fl22.html">Users' Note</a> for your implementation) is returned.</div><div class="paramtext">Records written to this output unit by other library routines are at most <m:math><m:mn>120</m:mn></m:math>&#160;characters long (including a line-printer carriage control character), unless those library routines allow you to specify longer records.</div><div class="paramtext">Note that if the unit number is set <m:math><m:mtext/><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>, no messages will be output.</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="IFLAG" id="IFLAG"/>1: &#160;&#160;&#8194; IFLAG &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the action to be taken (see <a class="arg" href="#NADV">NADV</a>).</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFLAG"><m:mi mathcolor="#EE0000" mathvariant="bold">IFLAG</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mn>1</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="NADV" id="NADV"/>2: &#160;&#160;&#8194; NADV &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On entry</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFLAG"><m:mi mathcolor="#EE0000" mathvariant="bold">IFLAG</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <a class="arg" href="#NADV">NADV</a> need not be set.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFLAG"><m:mi mathcolor="#EE0000" mathvariant="bold">IFLAG</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>, <a class="arg" href="#NADV">NADV</a> must specify the new advisory message unit number.</div>
</div>
<div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFLAG"><m:mi mathcolor="#EE0000" mathvariant="bold">IFLAG</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <a class="arg" href="#NADV">NADV</a> is set to the current advisory message unit number.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFLAG"><m:mi mathcolor="#EE0000" mathvariant="bold">IFLAG</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>, <a class="arg" href="#NADV">NADV</a> is unchanged.</div> 
<div class="paramtext">Note that Fortran unit numbers must be positive or zero. If <a class="arg" href="#NADV">NADV</a> is set <m:math><m:mtext/><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>, output of advisory messages is totally suppressed.</div>
</div></dd></dl><h2 class="standard"><a class="sec" name="errors" id="errors"/>6&#160;&#160;Error Indicators and Warnings</h2>
<div class="paramtext">None.</div><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">The time taken by X04ABF is negligible.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">In this example X04ABF is called by your main program to make the advisory message from the routine DUMMY appear on the same unit as the rest of the output (unit <m:math><m:mn>6</m:mn></m:math>).  Normally a NAG Library  routine with an IFAIL parameter (see <a class="chap" href="../P01/p01conts.xml">Chapter P01</a>) would take the place of DUMMY.</div><h3 class="standard"><a class="sec" name="examtext" id="examtext"/>9.1&#160;&#160;Program Text</h3>
<p><a class="verbatimref" href="../../examples/source/x04abfe.f">Program Text (x04abfe.f)</a></p><h3 class="standard"><a class="sec" name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3>
<div class="paramtext">None.</div><h3 class="standard"><a class="sec" name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3>
<p><a class="verbatimref" href="../../examples/baseresults/x04abfe.r">Program Results (x04abfe.r)</a></p>
<hr/><div><a class="rout" href="../../pdf/X04/x04abf.pdf">X04ABF (PDF version)</a></div><div><a class="chap" href="x04conts.xml">X04 Chapter Contents</a></div><div><a class="chapint" href="x04intro.xml">X04 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>
