<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — Help with Fortran MODULES]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=68</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=68&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Help with Fortran MODULES.]]></description>
		<lastBuildDate>Fri, 17 Feb 2012 23:11:11 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Help with Fortran MODULES]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=209#p209</link>
			<description><![CDATA[<p>John,</p><p>Modules in Fortran 90 (and higher) are simply organizational units within your source code.&nbsp; The files should remain named with proper Fortran extensions (.f, .f90, etc.).&nbsp; Files ending in .mod are generated by the compiler, and they are not human-readable.&nbsp; Furthermore, you can place multiple modules in the same Fortran file, although ordering of modules becomes important if they &quot;use&quot; each other.&nbsp; </p><p>There is a great tutorial for Fortran 90 written by a Dr. Shene from Michigan Technological University that delves into modules.&nbsp; Have a look at <a href="http://www.cs.mtu.edu/~shene/COURSES/cs201/NOTES/funct-module.html">http://www.cs.mtu.edu/~shene/COURSES/cs … odule.html</a>, specifically the section introducing modules as to the advantages of using them.&nbsp; I&#039;ve always used them as organizational units, grouping related data, functions, and subroutines together.&nbsp; You can also begin thinking about data and subprogram hiding (using PRIVATE and PUBLIC keywords), overloading functions based on argument types, and working with type-bound procedures when using modules.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Fri, 17 Feb 2012 23:11:11 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=209#p209</guid>
		</item>
		<item>
			<title><![CDATA[Help with Fortran MODULES]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=207#p207</link>
			<description><![CDATA[<p>I&#039;m a Fortran-IV and F77 veteran but new to F90 et seq.<br />I&#039;m starting to make use of, but not yet fully familiar with, <br /> - structured typing, <br /> - allocatable arrays and <br /> - modules.</p><p>Is there anuything I need to know about adding a module to a SF project?<br />Should the source filename be &#039;filename.mod&#039; or can be anything I like, as long as I add it to the project?</p><p>Do I add it just like anuy otehr source file?</p><p>And lastly, can anyone tell me what&#039;s wrong with this code (see below)?&nbsp; I am getting an error message pegged to the USE statement that the file &#039;materials.mod&#039; opened is not a GFORTRAN module file.</p><p>&nbsp; &nbsp; &nbsp; MODULE MATERIALS<br />C&nbsp; &nbsp; &nbsp;----------------<br />C&nbsp; &nbsp; &nbsp;Materials<br />C<br />C&nbsp; &nbsp; &nbsp;jw 17-02-12 draft<br />C&nbsp; &nbsp; &nbsp;jw 17-02-12 last amended</p><p>&nbsp; &nbsp; &nbsp; Type :: MATERIAL<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;REAL&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::&nbsp; &nbsp;Gamma,Emod,Gmod<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CHARACTER(24)&nbsp; ::&nbsp; &nbsp;Desc<br />&nbsp; &nbsp; &nbsp; END TYPE</p><p>&nbsp; &nbsp; &nbsp; TYPE(MATERIAL), ALLOCATABLE :: MATLS(:)</p><p>&nbsp; &nbsp; &nbsp; LOGICAL&nbsp; MadeMAT, ShowsMAT, GoodMAT</p><p>&nbsp; &nbsp; &nbsp; INTEGER&nbsp; idMatPAN,<br />&nbsp; &nbsp; &nbsp;+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; idMatPAN1,<br />&nbsp; &nbsp; &nbsp;+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; idMatPAN2,<br />&nbsp; &nbsp; &nbsp;+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; idMatTbl</p><br /><p>&nbsp; &nbsp; &nbsp; END MODULE MATERIALS</p><p>Any help will be greatly appreciated.<br />--- <br />John</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Fri, 17 Feb 2012 22:42:37 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=207#p207</guid>
		</item>
	</channel>
</rss>
