<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Anyone know about setrcd?]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=932&amp;type=atom" />
	<updated>2023-12-03T09:57:07Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=932</id>
		<entry>
			<title type="html"><![CDATA[Re: Anyone know about setrcd?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4264#p4264" />
			<content type="html"><![CDATA[<p>I haven&#039;t seen that in a long time <img src="https://forums.approximatrix.com/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />What that code snippet is doing is accepting a status from its caller and transmitting it back to whomever actually started the application and exiting the application. Say my program wanted to open a file &quot;foobar.dat&quot; and failed to open it. I would take the status given by the Fortran Open command (iostat=my_open_fail_status) and call EXIT_WITH_STATUS(my_open_fail_status). It would then cause my program to exit and return &quot;my_open_fail_status&quot; to whatever had actually called the program. That could be the dos shell, or in Unix, whatever had spawned the program.<br />If you are using the Simply Fortran GCC compiler, you can replace EXIT_WITH_STATUS(me_status) with CALL EXIT(me_status) and everything will work identically. &quot;Call Exit()&quot; is a language extension and not part of the standard as far as I know, so you may wish to use the &quot;error stop&quot; construct such as &quot;error stop me_status, quiet=.true.&quot;&nbsp; to stop the program as you can use that out of a pure subroutine, and no stderror output but pass the exit status to the invoker.<br />I hope this helps and is clear enough. If not, reply and &amp; try to clarify</p>]]></content>
			<author>
				<name><![CDATA[peter.kelly]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3586</uri>
			</author>
			<updated>2023-12-03T09:57:07Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4264#p4264</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Anyone know about setrcd?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4263#p4263" />
			<content type="html"><![CDATA[<p>I have the F90 source code for an older program that when I build, it complains about not having access to setrcd.</p><p>The specific code is:</p><p> subroutine EXIT_WITH_STATUS ( STATUS )<br />&nbsp; ! Exit and return STATUS to the invoking process<br />&nbsp; &nbsp; integer, intent(in) :: STATUS<br />&nbsp; &nbsp; external :: SETRCD<br />&nbsp; &nbsp; call setrcd ( status )<br />&nbsp; &nbsp; stop<br />&nbsp; end subroutine EXIT_WITH_STATUS</p><p>In Googling, this appears to possibly be from Lahey/Fujitsu Fortran, and provides some sort of integer/byte for a status code.</p><p>Can anyone shed any more light on this topic? Possible problems with deleting this reference?</p>]]></content>
			<author>
				<name><![CDATA[Lewist57]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=4033</uri>
			</author>
			<updated>2023-12-01T22:17:25Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4263#p4263</id>
		</entry>
</feed>
