<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — different behavior in program runs from SF and direct calling exe-file]]></title>
	<link rel="self" href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=677&amp;type=atom" />
	<updated>2018-06-04T19:33:59Z</updated>
	<generator>PunBB</generator>
	<id>http://forums.approximatrix.com/viewtopic.php?id=677</id>
		<entry>
			<title type="html"><![CDATA[Re: different behavior in program runs from SF and direct calling exe-file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3137#p3137" />
			<content type="html"><![CDATA[<p>Thanks Jeff, <br />I shall follow up your advice and use units lager than 100. Generally I only have to change the IO unit parameter file, I think, like: <br />....<br /> INTEGER, parameter&nbsp; ::&nbsp; IO_IN = 101<br />....<br />First I must look in source files to see if there are nasty consequences...<br />Also I shall remove after testing print statement or change it to write statements sending this messages to an already existing report file</p><p>regards, Klaus</p>]]></content>
			<author>
				<name><![CDATA[Klaus Asmus]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3617</uri>
			</author>
			<updated>2018-06-04T19:33:59Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3137#p3137</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: different behavior in program runs from SF and direct calling exe-file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3136#p3136" />
			<content type="html"><![CDATA[<p>Klaus,</p><p>Unless you state otherwise, on Windows <em>integer</em> defaults to <em>integer(kind=4)</em> unless you explicitly state otherwise or you&#039;ve added a compiler flag to change default behavior.</p><p>I&#039;m not sure why the program doesn&#039;t crash immediately, but it might only die when input/output is attempted on a bad unit.</p><p>As a general rule, unit numbers below 20 are all dangerous for legacy reasons. Many of those units have special meaning on certain compilers.&nbsp; I think one Fortran 90 compiler I used in the distant past had <em>unit=13</em> pointing at a printer, for example.&nbsp; I normally suggest using unit numbers above 100 to be safe.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2018-06-04T14:42:20Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3136#p3136</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: different behavior in program runs from SF and direct calling exe-file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3134#p3134" />
			<content type="html"><![CDATA[<p>Jeff, problem solved!<br />The crash was caused by an unit in an open statement for output (error by iostat=2). Notwithstanding prior mentioned parameters, there was a variable unit specified out side the procedure where the crash happened as follows<br />integer IOunit<br />IOunit =&nbsp; IO_OT<br />While parameter IO_OT is declared as integer(4)<br />Is Integer&nbsp; the same as integer(4) as i have learned ? I am in doubt, because I had more troubles and decided to use not more both for the same variable. Unfortunately I have a lot elder software still in CVF.</p><p>However i still wonder why the crash doesn&#039;t starting the program in SF</p><p>Regards, Klaus</p>]]></content>
			<author>
				<name><![CDATA[Klaus Asmus]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3617</uri>
			</author>
			<updated>2018-06-04T13:34:07Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3134#p3134</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: different behavior in program runs from SF and direct calling exe-file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3133#p3133" />
			<content type="html"><![CDATA[<p>Jeff,<br />For compiling I use the SF defaults. <br />For IO no units 5 and 6 are used. I have a file with standard units, UNITS.fi with following content: <br />&nbsp; &nbsp; &nbsp; &nbsp; INTEGER(4), parameter&nbsp; ::&nbsp; IO_TM = 0<br />&nbsp; &nbsp; INTEGER(4), parameter&nbsp; ::&nbsp; IO_IN = 1<br />&nbsp; &nbsp; INTEGER(4), parameter&nbsp; ::&nbsp; IO_IN2= 2<br />&nbsp; &nbsp; INTEGER(4), parameter&nbsp; ::&nbsp; IO_PR = 7<br />&nbsp; &nbsp; INTEGER(4), parameter&nbsp; ::&nbsp; IO_OT = 8<br />&nbsp; &nbsp; INTEGER(4), parameter&nbsp; ::&nbsp; IO_OT2= 9<br />&nbsp; &nbsp; INTEGER(4), parameter&nbsp; ::&nbsp; IO_KL = 3<br /> IO_TM is still a heritage from CVF, even as IO_PR for direct printing </p><p>Wherever I use IO the file is added by an include file</p><p>Is unit 0 also an problem? May be somewhere it is still used in a single case. <br />Regards, Klaus</p>]]></content>
			<author>
				<name><![CDATA[Klaus Asmus]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3617</uri>
			</author>
			<updated>2018-06-04T11:07:12Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3133#p3133</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: different behavior in program runs from SF and direct calling exe-file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3131#p3131" />
			<content type="html"><![CDATA[<p>Klaus,</p><p>Are you compiling with the <em>Windows GUI</em> option enabled?&nbsp; Just curious, but you shouldn&#039;t if you&#039;re attempting to use <em>Print</em> or <em>Write</em> statements.&nbsp; Also, do you explicitly point units 5 or 6 at files?&nbsp; That should also be avoided under all circumstances.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2018-06-01T18:37:20Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3131#p3131</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: different behavior in program runs from SF and direct calling exe-file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3130#p3130" />
			<content type="html"><![CDATA[<p>hello Jeff,<br />The program crashes after some second (no freeze). I&#039;ll check the path to read and write. My program has a user defined object directory and a directory for standard sources, but preliminary files are contained in the directory containing the executable. <br />What about the print statements if there is no SF console? The only reason that I do temporary print is to get a quick log of a program run</p><p>Regards, Klaus</p>]]></content>
			<author>
				<name><![CDATA[Klaus Asmus]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3617</uri>
			</author>
			<updated>2018-06-01T16:21:26Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3130#p3130</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: different behavior in program runs from SF and direct calling exe-file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3129#p3129" />
			<content type="html"><![CDATA[<p>Klaus,</p><p>When you say &quot;the program stops without any message,&quot;&nbsp; does the program crash, or does it just appear to freeze?</p><p>Assuming you&#039;re running on Windows, you may be able to attach Simply Fortran&#039;s debugger to the program as it runs outside of Simply Fortran.&nbsp; If your program is freezing, just start Simply Fortran, load your project, and select &quot;Attach...&quot; in the Debug menu (on Windows, at least).&nbsp; You should get a current listing in the Stack view of the Debug panel so you can at least see where your program is frozen.</p><p>The only difference with running from Simply Fortran is that the working directory is configured by Simply Fortran when the executable is launched.&nbsp; In theory, there is no other difference from just starting it from Windows Explorer or the command prompt.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2018-06-01T11:40:41Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3129#p3129</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[different behavior in program runs from SF and direct calling exe-file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3128#p3128" />
			<content type="html"><![CDATA[<p>I find several disadvantages running exe files directly. One point i reported earlier, a new case is that the program stops without any message after using a procedure reading&nbsp; data from file, editing and writing back to file. In a run started from SF the occur no error. So I can&#039;t debug this crash. There are several print statements in this procedure. Do they haven any influence of this crashes?</p><p>Regards Klaus</p>]]></content>
			<author>
				<name><![CDATA[Klaus Asmus]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3617</uri>
			</author>
			<updated>2018-06-01T11:25:05Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3128#p3128</id>
		</entry>
</feed>
