<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Problem handling files when coming from Win->MacOS]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=920&amp;type=atom" />
	<updated>2023-10-21T16:36:29Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=920</id>
		<entry>
			<title type="html"><![CDATA[Re: Problem handling files when coming from Win->MacOS]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4228#p4228" />
			<content type="html"><![CDATA[<p>I think we discussed this via email, but macOS Finder, when a program is double-clicked, always treats the working directory as the user&#039;s home directory.&nbsp; If you ran the code from the macOS Terminal from the directory where your executable exists with <em>input.inp</em> in said directory, it will work fine.</p><p>You just need to be aware of the difference between a working directory and the directory where your executable happens to exist; they aren&#039;t necessarily the same.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2023-10-21T16:36:29Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4228#p4228</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Problem handling files when coming from Win->MacOS]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4223#p4223" />
			<content type="html"><![CDATA[<p>Sorry if this may be silly thing, but I am clueless:</p><p>I changed from Win11 to MacOS. But I have some (beginner&#039;s?) trouble when opening and writing files. To check the situation, I wrote a simple program (see below), which should just read an ascii-file and write another ascii-file into a sub-folder. </p><p>During compilation, everything runs well, but when starting the executable by double click, an &quot;end of file message&quot; is being displayed referring to program line 11. But the file could be read during compilation, and the output file is being created in the existing sub-folder /out during compilation, too.</p><p>---------------------------------<br />program filetest</p><p>character (len=4) dummy<br />real a<br />integer b</p><p>write(*,*) &#039;hello&#039;</p><p>open(unit=1, file=&#039;./input.inp&#039;)</p><p>read(1,*) dummy&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! line 11<br />write(*,*) dummy<br />read(1,*) a<br />write(*,*) a<br />read(1,*) b<br />write(*,*) b</p><p>close(1)</p><p>write(*,*) dummy,a,b</p><p>open(unit=2, file=&#039;./out/output.out&#039;)<br />write(2,*) dummy<br />write(2,*) a<br />write(2,*) b<br />close(2)</p><p>end program</p>]]></content>
			<author>
				<name><![CDATA[MUC]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=4152</uri>
			</author>
			<updated>2023-10-16T15:14:08Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4223#p4223</id>
		</entry>
</feed>
