<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Variable is not declared or conflicts]]></title>
	<link rel="self" href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=634&amp;type=atom" />
	<updated>2017-06-13T20:14:16Z</updated>
	<generator>PunBB</generator>
	<id>http://forums.approximatrix.com/viewtopic.php?id=634</id>
		<entry>
			<title type="html"><![CDATA[Re: Variable is not declared or conflicts]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2912#p2912" />
			<content type="html"><![CDATA[<p>Okay, I&#039;ll try to avoid those problems.</p>]]></content>
			<author>
				<name><![CDATA[kmutiny]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3620</uri>
			</author>
			<updated>2017-06-13T20:14:16Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2912#p2912</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Variable is not declared or conflicts]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2911#p2911" />
			<content type="html"><![CDATA[<p>constants (a parameter is a named constant) can not be in a common block; just variables</p><p>You put a variable name in a common block, and equate the variable to a parameter to somewhat get the same effect.</p><p>The code is a good reminder to me of how nice the newer features of Fortran 90 and beyond are.</p>]]></content>
			<author>
				<name><![CDATA[baf1]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3660</uri>
			</author>
			<updated>2017-06-13T04:28:18Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2911#p2911</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Variable is not declared or conflicts]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2910#p2910" />
			<content type="html"><![CDATA[<p>This may be too long a question. But here goes.</p><p>I’m compiling a project in Windows called ModTran3 with 10 *.f files and am constructing a missing include file called “parameter.list”. Here is the beginning of the 5th file called “f-MT3a-driver.server.f”. Note the variable NSPEC at the end of line = driv 130.</p><p>&nbsp; &nbsp; &nbsp; &nbsp;SUBROUTINE DRIVER&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;driv 100<br />&nbsp; &nbsp; &nbsp; include &#039;parameter.list&#039;<br />&nbsp; &nbsp; &nbsp; COMMON RELHUM(laydim),HSTOR(laydim),ICH(4),VH(17),TX(65),W(65)&nbsp; &nbsp; driv 110<br />&nbsp; &nbsp; &nbsp; COMMON IMSMX,WPATH(laythr,65),TBBY(laythr),PATM(laythr),NSPEC,&nbsp; &nbsp; &nbsp;driv 130<br />&nbsp; &nbsp; &nbsp;x KPOINT(12),ABSC(5,47),EXTC(5,47),ASYM(5,47),VX2(47),AWCCON(5)&nbsp; &nbsp; driv 140</p><br /><p>In parameter.list, I tried 4 options concerning NSPEC. None of them work.</p><p>c1&nbsp; &nbsp; ! Do Nothing<br />c2&nbsp; &nbsp; &nbsp; parameter(nspec=12)<br />c3&nbsp; &nbsp; &nbsp; nspec=12<br />c4&nbsp; &nbsp; &nbsp; integer nspec/12/</p><p>c&nbsp; &nbsp; Some computations using nspec<br />&nbsp; &nbsp; &nbsp; PARAMETER(NSPECX=13, NSPECT=NSPEC+NSPECX)<br />&nbsp; &nbsp; &nbsp; PARAMETER(NSPEC2=2*NSPEC, NSPECX2=2*NSPECX, NSPECT2=2*NSPECT)</p><p>c End of parameter.list</p><p>----------------------------------<br />Option c1 (i.e., do nothing) gives this error:</p><p>Compiling .\f-MT3a-dpdisort.f<br />parameter.list:15:34:</p><p>&nbsp; &nbsp; &nbsp; &nbsp;PARAMETER(NSPECX=13, NSPECT=NSPEC+NSPECX)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1<br />Error: Parameter &#039;nspec&#039; at (1) has not been declared or is a variable, which does not reduce to a constant expression<br />parameter.list:16:30:</p><p>Option c2 gives this error:</p><p>Compiling .\f-MT3a-driver.server.f<br />.\f-MT3a-driver.server.f:4:67:</p><p>&nbsp; &nbsp; &nbsp; &nbsp;COMMON IMSMX,WPATH(laythr,65),TBBY(laythr),PATM(laythr),NSPEC,&nbsp; &nbsp; &nbsp;driv 130<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1<br />Error: PARAMETER attribute conflicts with COMMON attribute in &#039;nspec&#039; at (1)</p><br /><p>Option c3 gives this error:</p><p>Compiling .\f-MT3a-dpdisort.f<br />parameter.list:16:34:</p><p>&nbsp; &nbsp; &nbsp; &nbsp;PARAMETER(NSPECX=13, NSPECT=NSPEC+NSPECX)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1<br />Error: Parameter &#039;nspec&#039; at (1) has not been declared or is a variable, which does not reduce to a constant expression<br />parameter.list:17:30:</p><p>Option c4 gives this error:</p><p>Compiling .\f-MT3a-dpdisort.f<br />parameter.list:16:34:</p><p>&nbsp; &nbsp; &nbsp; &nbsp;PARAMETER(NSPECX=13, NSPECT=NSPEC+NSPECX)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1<br />Error: Parameter &#039;nspec&#039; at (1) has not been declared or is a variable, which does not reduce to a constant expression<br />parameter.list:17:30:</p><p>Any help?</p>]]></content>
			<author>
				<name><![CDATA[kmutiny]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3620</uri>
			</author>
			<updated>2017-06-13T02:11:04Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2910#p2910</id>
		</entry>
</feed>
