<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — different behavior in program runs from SF and direct calling exe-file]]></title>
		<link>http://forums.approximatrix.com/viewtopic.php?id=677</link>
		<atom:link href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=677&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in different behavior in program runs from SF and direct calling exe-file.]]></description>
		<lastBuildDate>Mon, 04 Jun 2018 19:33:59 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: different behavior in program runs from SF and direct calling exe-file]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=3137#p3137</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (Klaus Asmus)]]></author>
			<pubDate>Mon, 04 Jun 2018 19:33:59 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=3137#p3137</guid>
		</item>
		<item>
			<title><![CDATA[Re: different behavior in program runs from SF and direct calling exe-file]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=3136#p3136</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Mon, 04 Jun 2018 14:42:20 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=3136#p3136</guid>
		</item>
		<item>
			<title><![CDATA[Re: different behavior in program runs from SF and direct calling exe-file]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=3134#p3134</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (Klaus Asmus)]]></author>
			<pubDate>Mon, 04 Jun 2018 13:34:07 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=3134#p3134</guid>
		</item>
		<item>
			<title><![CDATA[Re: different behavior in program runs from SF and direct calling exe-file]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=3133#p3133</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (Klaus Asmus)]]></author>
			<pubDate>Mon, 04 Jun 2018 11:07:12 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=3133#p3133</guid>
		</item>
		<item>
			<title><![CDATA[Re: different behavior in program runs from SF and direct calling exe-file]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=3131#p3131</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Fri, 01 Jun 2018 18:37:20 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=3131#p3131</guid>
		</item>
		<item>
			<title><![CDATA[Re: different behavior in program runs from SF and direct calling exe-file]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=3130#p3130</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (Klaus Asmus)]]></author>
			<pubDate>Fri, 01 Jun 2018 16:21:26 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=3130#p3130</guid>
		</item>
		<item>
			<title><![CDATA[Re: different behavior in program runs from SF and direct calling exe-file]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=3129#p3129</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Fri, 01 Jun 2018 11:40:41 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=3129#p3129</guid>
		</item>
		<item>
			<title><![CDATA[different behavior in program runs from SF and direct calling exe-file]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=3128#p3128</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (Klaus Asmus)]]></author>
			<pubDate>Fri, 01 Jun 2018 11:25:05 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=3128#p3128</guid>
		</item>
	</channel>
</rss>
