<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 20, 2013 at 12:00 PM,  <span dir="ltr">&lt;<a href="mailto:cmake-request@cmake.org" target="_blank">cmake-request@cmake.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":u6" style="overflow:hidden">Is your original<br>
message saying that a Fortran compiler might compile<br>
<br>
 integer*8 myinteger<br>
<br>
but fail at runtime?</div></blockquote></div><br>No, my point is that there is no guarantee that integer*8 or integer*16 exist at all (at compile time) but you can query whether or not they exist at run time. However, you cannot dynamically pick the integer type of a variable at run time.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">For example, you can write code to request progressively larger integer kinds and return their kind if they exist, at run time. If they don&#39;t exist an error value is returned instead. However, the integer kind of a variable must be specified at compile time, so there is (currently) no viable way to dynamically select a variable&#39;s integer type. (Unlimited polymorphic variables and parameterized derived types fix these issues, but compiler support is spotty for the former and non-existent for the latter, and will take a long time to change.)</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">To summarize the issue: Variable&#39;s integer kind type must be a compile time constant (currently) AND checks to determine what integer types are supported are run time only.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">It seems the array variable integer_kinds supplied in ISO_FORTRAN_ENV by the F2008 standard partially circumvents this issue, but, to my knowledge, there is no guarantee in the standard that the array holds the available integer kinds in a sorted order with the smallest integer kind as integer_kinds(1) and the largest as integer_kinds(size(integer_kinds)), but this would seem to be a reasonable assumption. I still am determining compiler support/compliance for this F2008 feature.<br>

<br clear="all"><div>Izaak Beekman<br>===================================<br>(301)244-9367<br>Princeton University Doctoral Candidate<br>Mechanical and Aerospace Engineering<br><a href="mailto:ibeekman@princeton.edu" target="_blank">ibeekman@princeton.edu</a><br>

<br>UMD-CP Visiting Graduate Student<br>Aerospace Engineering<br><a href="mailto:ibeekman@umiacs.umd.edu" target="_blank">ibeekman@umiacs.umd.edu</a><br><a href="mailto:ibeekman@umd.edu" target="_blank">ibeekman@umd.edu</a></div>


</div></div>