<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?action=history&amp;feed=atom&amp;title=Porfuncs_Documentation</id>
	<title>Porfuncs Documentation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?action=history&amp;feed=atom&amp;title=Porfuncs_Documentation"/>
	<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Porfuncs_Documentation&amp;action=history"/>
	<updated>2026-04-12T04:40:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Porfuncs_Documentation&amp;diff=1320&amp;oldid=prev</id>
		<title>Adk44: Created page with &quot;Various system functions are included in the porfuncs module, generated from porfuncs.sh. They are documented here as a reference for developers. Please use these subroutines,...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Porfuncs_Documentation&amp;diff=1320&amp;oldid=prev"/>
		<updated>2019-05-13T12:30:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Various system functions are included in the porfuncs module, generated from porfuncs.sh. They are documented here as a reference for developers. Please use these subroutines,...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Various system functions are included in the porfuncs module, generated from porfuncs.sh. They are documented here as a reference for developers. Please use these subroutines, rather than any of the system calls directly, to maintain compiler independence.&lt;br /&gt;
&lt;br /&gt;
===FLUSH===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
subroutine flush(unit, istat)&lt;br /&gt;
  integer, intent(in) :: unit&lt;br /&gt;
  integer, intent(out), optional :: istat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flushes the output buffer of the stream specified by unit. The optional argument istat does nothing and is present to allow old code to compile. It should be omitted from new code.&lt;br /&gt;
&lt;br /&gt;
===IARGC===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
subroutine iargc_subr(n)&lt;br /&gt;
  integer, intent(out) :: n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets n to be the number of command line arguments which were present when the program was invoked.&lt;br /&gt;
&lt;br /&gt;
===GETARG===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
subroutine getarg_subr(position, value)&lt;br /&gt;
  integer, intent(in) :: position&lt;br /&gt;
  character(len=*), intent(out) :: value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets value to be the command line argument specified by position.&lt;br /&gt;
&lt;br /&gt;
===FORK===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
subroutine fork_subr(pid)&lt;br /&gt;
  integer, intent(inout) :: pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a copy of the current process, with the copy being a child of the current process. In the parent process, pid is set to the process ID of the child process. In the child process, pid is set to zero.&lt;br /&gt;
&lt;br /&gt;
===SYSTEM===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
subroutine system_subr(jobstring, exitstatus)&lt;br /&gt;
  character(len=*), intent(in) :: jobstring&lt;br /&gt;
  integer, intent(out), optional :: exitstatus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Execute the command present in jobstring. If the optional argument exitstatus is present, it will be set to the return value of the command.&lt;br /&gt;
&lt;br /&gt;
===WAIT===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
subroutine wait_subr(pid, exitstatus)&lt;br /&gt;
  integer, intent(inout) :: pid&lt;br /&gt;
  integer, intent(inout) :: exitstatus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suspend execution of the current process until one of its child processes exits. pid is set to the process ID of the exiting process. exitstatus is set to the return value of the child process.&lt;br /&gt;
&lt;br /&gt;
===GETPID===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
subroutine getpid_subr(pid)&lt;br /&gt;
  integer, intent(out) :: pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set pid to the process ID of the current process.&lt;br /&gt;
&lt;br /&gt;
===EXIT===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
subroutine exit_subr(exitstatus)&lt;br /&gt;
  integer, intent(in) :: exitstatus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Terminate the current process, with the return value specified by exitstatus.&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
</feed>