Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>List-directed output is processor-specific (note that Fortran standard calls "processor" what we'd normally refer to as "compiler"). Here is what the Fortran 90 standard says about list-directed output:</p> <blockquote> <p>10.8.2 List-directed output</p> <p>...</p> <p>Integer output constants are produced with the effect of an <code>Iw</code> edit descriptor.</p> <p>Real constants are produced with the effect of either an <code>F</code> edit descriptor or an <code>E</code> edit descriptor, depending on the magnitude <code>x</code> of the value and a range 10<sup>d1</sup> &lt;= <code>x</code> &lt; 10<sup>d2</sup>, where <code>d1</code> and <code>d2</code> are processor-dependent integers. If the magnitude <code>x</code> is within this range, the constant is produced using <code>0PFw.d</code>; otherwise, <code>1PEw.dEe</code> is used.</p> <p>For numeric output, <em>reasonable processor-dependent values</em> of <code>w</code>, <code>d</code>, and <code>e</code> are used for each of the numeric constants output.</p> </blockquote> <p>(emphasis mine)</p> <p>The same rules are used for numerical values. The text in §10.10.4 of the Fortran 2008 standard copies that from the Fortran 90 standard so no changes in list-directed output were introduced.</p> <p>As noted already by M. S. B., you can use the <code>I0</code> edit descriptor to print integer values with the least amount of space necessary:</p> <pre><code>! Note the space in the string PRINT '("The difference is ",I0)', diff </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload