<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — Console screen, more]]></title>
		<link>http://forums.approximatrix.com/viewtopic.php?id=354</link>
		<atom:link href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=354&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Console screen, more.]]></description>
		<lastBuildDate>Thu, 15 Aug 2024 19:57:05 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Console screen, more]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=4358#p4358</link>
			<description><![CDATA[<p>Jeff,</p><p>I&#039;m also confused about the Fortran 2008 &quot;Newunit&quot; identifier.</p><p>When not using &quot;Newunit&quot;, an external unit identifier refers to an external file that is represented by an integer expression. The integer expression has one of the following values in the range 1 through 2147483647</p><p>When using &quot;Newunit&quot;, Fortran 2008 standard requires that the unit number that comes back with the NEWUNIT specifier be a negative number. </p><p>INTEL Documentation says that NEWUNIT = u-var<br />Is a scalar integer variable that is assigned the automatically chosen unit number. It is always a negative integer. </p><p>IBM Documentation says that NEWUNIT= var (Fortran 2008) is an input/output specifier that specifies the NEWUNIT value for the connection. var is a scalar default integer variable. The NEWUNIT value is a negative number that is less than -2 and is unequal to the unit number of any currently connected file.</p><p>I&#039;ve also read that it is less than -1. But my question is, can these negative unit numbers be easily turned into positive numbers for use in Input/Output?</p><p>Or should we use,</p><p>&nbsp; &nbsp; iunit = 0<br />&nbsp; &nbsp; do i = 100, 999<br />&nbsp; &nbsp; &nbsp; &nbsp; inquire ( unit = i, opened = lopen, iostat = ios )</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if ( ios == 0 ) then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ( .not. lopen ) then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; iunit = i<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if<br />&nbsp; &nbsp; &nbsp; &nbsp; end if<br />&nbsp; &nbsp; end do</p><p>Frank</p>]]></description>
			<author><![CDATA[null@example.com (drfrank)]]></author>
			<pubDate>Thu, 15 Aug 2024 19:57:05 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=4358#p4358</guid>
		</item>
		<item>
			<title><![CDATA[Re: Console screen, more]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=4357#p4357</link>
			<description><![CDATA[<p>Units 5 and 6 in Simply Fortran&#039;s compiler refer to standard input and standard output by default.&nbsp; This assignment is pretty common in other Fortran compilers as well.&nbsp; When you use an OPEN statement and refer to either unit, your program will no longer be able to read from standard input (the keyboard) and/or write to standard output (the screen).&nbsp; Our compiler now warns during compilation if an OPEN statement attempts to use either unit.</p><p>Unit numbers under 20 have historically had special meanings depending on the compiler, platform, etc.&nbsp; It is best to either allow Fortran to manage unit numbers using the <em>newunit</em> specifier:</p><div class="codebox"><pre><code>OPEN(newunit=unum, file=&quot;output.txt&quot;, status=&quot;unknown&quot;, action=&quot;write&quot;)</code></pre></div><p>or use unit numbers that are over 100.&nbsp; Single digit unit numbers can be problematic depending on your compiler and/or platform.&nbsp; With our compiler, units 5 and 6 can be highly problematic to reassign.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Thu, 15 Aug 2024 12:22:31 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=4357#p4357</guid>
		</item>
		<item>
			<title><![CDATA[Re: Console screen, more]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=4356#p4356</link>
			<description><![CDATA[<p>Hello, I find this a rather strange message.<br />What about reserving units 5 and (screen and printer) ?<br />Can you give a word more about it?</p>]]></description>
			<author><![CDATA[null@example.com (McTes)]]></author>
			<pubDate>Wed, 14 Aug 2024 16:51:19 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=4356#p4356</guid>
		</item>
		<item>
			<title><![CDATA[Console screen, more]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=1435#p1435</link>
			<description><![CDATA[<p>I&nbsp; tried reserving&nbsp; units 5 &amp; 6 and now the console screen works ok.<br />Thanks</p>]]></description>
			<author><![CDATA[null@example.com (mtmisery1682)]]></author>
			<pubDate>Mon, 16 Jun 2014 18:28:04 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=1435#p1435</guid>
		</item>
	</channel>
</rss>
