Skip to content

Commit eecd661

Browse files
committed
Include docs for intrinsic functions
1 parent 90b566c commit eecd661

File tree

272 files changed

+14511
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+14511
-0
lines changed

src/docs/ABORT.html

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<code>ABORT</code> — Abort the program
2+
3+
<h3>Description</h3>
4+
<code>ABORT</code> causes immediate termination of the program. On operating
5+
systems that support a core dump, <code>ABORT</code> will produce a core dump.
6+
It will also print a backtrace, unless <code>-fno-backtrace</code> is given.
7+
8+
<br>
9+
10+
<h3>Syntax</h3>
11+
<code>CALL ABORT</code>
12+
13+
<br>
14+
15+
<h3>Return value</h3>
16+
Does not return.
17+
18+
<br>
19+
20+
<h3>Example</h3>
21+
22+
<code class="smallexample" syntax="Packages/Fortran/grammars/FortranModern.sublime-syntax">
23+
<br>program test_abort
24+
<br>  integer :: i = 1, j = 2
25+
<br>  if (i /= j) call abort
26+
<br>end program test_abort</code>
27+
<br>
28+
29+
<h3>Standard</h3>
30+
GNU extension
31+
32+
<br>
33+
34+
<h3>Class</h3>
35+
Subroutine
36+
37+
<br>
38+
39+
<h3>See also</h3>
40+
<a href="EXIT.html#EXIT">EXIT</a>, <a href="KILL.html#KILL">KILL</a>, <a href="BACKTRACE.html#BACKTRACE">BACKTRACE</a>
41+
42+

src/docs/ABS.html

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<code>ABS</code> — Absolute value
2+
3+
<h3>Description</h3>
4+
<code>ABS(A)</code> computes the absolute value of <code>A</code>.
5+
6+
<br>
7+
8+
<h3>Syntax</h3>
9+
<code>RESULT = ABS(A)</code>
10+
11+
<br>
12+
13+
<h3>Arguments</h3>
14+
15+
<p><table summary=""><tbody><tr align="left"><td valign="top" width="15%"><var>A</var> </td><td valign="top" width="70%">The type of the argument shall be an <code>INTEGER</code>,
16+
<code>REAL</code>, or <code>COMPLEX</code>.
17+
<br></td></tr></tbody></table>
18+
19+
<br></p>
20+
21+
<h3>Return value</h3>
22+
The return value is of the same type and
23+
kind as the argument except the return value is <code>REAL</code> for a
24+
<code>COMPLEX</code> argument.
25+
26+
<br>
27+
28+
<h3>Example</h3>
29+
30+
<code class="smallexample" syntax="Packages/Fortran/grammars/FortranModern.sublime-syntax">
31+
<br>program test_abs
32+
<br>  integer :: i = -1
33+
<br>  real :: x = -1.e0
34+
<br>  complex :: z = (-1.e0,0.e0)
35+
<br>  i = abs(i)
36+
<br>  x = abs(x)
37+
<br>  x = abs(z)
38+
<br>end program test_abs</code>
39+
<br>
40+
41+
<h3>Specific names</h3>
42+
43+
<p><table summary=""><tbody><tr align="left"><td valign="top" width="20%">Name </td><td valign="top" width="20%">Argument </td><td valign="top" width="20%">Return type </td><td valign="top" width="25%">Standard
44+
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>ABS(A)</code> </td><td valign="top" width="20%"><code>REAL(4) A</code> </td><td valign="top" width="20%"><code>REAL(4)</code> </td><td valign="top" width="25%">Fortran 77 and later
45+
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>CABS(A)</code> </td><td valign="top" width="20%"><code>COMPLEX(4) A</code> </td><td valign="top" width="20%"><code>REAL(4)</code> </td><td valign="top" width="25%">Fortran 77 and later
46+
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>DABS(A)</code> </td><td valign="top" width="20%"><code>REAL(8) A</code> </td><td valign="top" width="20%"><code>REAL(8)</code> </td><td valign="top" width="25%">Fortran 77 and later
47+
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>IABS(A)</code> </td><td valign="top" width="20%"><code>INTEGER(4) A</code> </td><td valign="top" width="20%"><code>INTEGER(4)</code> </td><td valign="top" width="25%">Fortran 77 and later
48+
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>ZABS(A)</code> </td><td valign="top" width="20%"><code>COMPLEX(8) A</code> </td><td valign="top" width="20%"><code>COMPLEX(8)</code> </td><td valign="top" width="25%">GNU extension
49+
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>CDABS(A)</code> </td><td valign="top" width="20%"><code>COMPLEX(8) A</code> </td><td valign="top" width="20%"><code>COMPLEX(8)</code> </td><td valign="top" width="25%">GNU extension
50+
<br></td></tr></tbody></table>
51+
</p>
52+
53+
<h3>Standard</h3>
54+
Fortran 77 and later, has overloads that are GNU extensions
55+
56+
<br>
57+
58+
<h3>Class</h3>
59+
Elemental function
60+
61+
<br>

src/docs/ACCESS.html

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<code>ACCESS</code> — Checks file access modes
2+
3+
<h3>Description</h3>
4+
<code>ACCESS(NAME, MODE)</code> checks whether the file <var>NAME</var>
5+
exists, is readable, writable or executable. Except for the
6+
executable check, <code>ACCESS</code> can be replaced by
7+
Fortran 95's <code>INQUIRE</code>.
8+
9+
<br>
10+
11+
<h3>Syntax</h3>
12+
<code>RESULT = ACCESS(NAME, MODE)</code>
13+
14+
<br>
15+
16+
<h3>Arguments</h3>
17+
18+
<p><table summary=""><tbody><tr align="left"><td valign="top" width="15%"><var>NAME</var> </td><td valign="top" width="70%">Scalar <code>CHARACTER</code> of default kind with the
19+
file name. Tailing blank are ignored unless the character <code>achar(0)</code>
20+
is present, then all characters up to and excluding <code>achar(0)</code> are
21+
used as file name.
22+
<br></td></tr><tr align="left"><td valign="top" width="15%"><var>MODE</var> </td><td valign="top" width="70%">Scalar <code>CHARACTER</code> of default kind with the
23+
file access mode, may be any concatenation of <code>"r"</code> (readable),
24+
<code>"w"</code> (writable) and <code>"x"</code> (executable), or <code>" "</code> to check
25+
for existence.
26+
<br></td></tr></tbody></table>
27+
28+
<br></p>
29+
30+
<h3>Return value</h3>
31+
Returns a scalar <code>INTEGER</code>, which is <code>0</code> if the file is
32+
accessible in the given mode; otherwise or if an invalid argument
33+
has been given for <code>MODE</code> the value <code>1</code> is returned.
34+
35+
<br>
36+
37+
<h3>Example</h3>
38+
39+
<code class="smallexample" syntax="Packages/Fortran/grammars/FortranModern.sublime-syntax">
40+
<br>program access_test
41+
<br>  implicit none
42+
<br>  character(len=*), parameter :: file = 'test.dat'
43+
<br>  character(len=*), parameter :: file2 = 'test.dat '//achar(0)
44+
<br>  if(access(file,' ') == 0) print *, trim(file),' is exists'
45+
<br>  if(access(file,'r') == 0) print *, trim(file),' is readable'
46+
<br>  if(access(file,'w') == 0) print *, trim(file),' is writable'
47+
<br>  if(access(file,'x') == 0) print *, trim(file),' is executable'
48+
<br>  if(access(file2,'rwx') == 0) &amp;
49+
<br>    print *, trim(file2),' is readable, writable and executable'
50+
<br>end program access_test</code>
51+
<br>
52+
53+
<h3>Specific names</h3>
54+
55+
56+
57+
<h3>Standard</h3>
58+
GNU extension
59+
60+
<br>
61+
62+
<h3>Class</h3>
63+
Inquiry function
64+
65+
<br>
66+
67+
<h3>See also</h3>
68+

src/docs/ACHAR.html

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<code>ACHAR</code> — Character in <acronym>ASCII</acronym> collating sequence
2+
3+
<h3>Description</h3>
4+
<code>ACHAR(I)</code> returns the character located at position <code>I</code>
5+
in the <acronym>ASCII</acronym> collating sequence.
6+
7+
<br>
8+
9+
<h3>Syntax</h3>
10+
<code>RESULT = ACHAR(I [, KIND])</code>
11+
12+
<br>
13+
14+
<h3>Arguments</h3>
15+
16+
<p><table summary=""><tbody><tr align="left"><td valign="top" width="15%"><var>I</var> </td><td valign="top" width="70%">The type shall be <code>INTEGER</code>.
17+
<br></td></tr><tr align="left"><td valign="top" width="15%"><var>KIND</var> </td><td valign="top" width="70%">(Optional) An <code>INTEGER</code> initialization
18+
expression indicating the kind parameter of the result.
19+
<br></td></tr></tbody></table>
20+
21+
<br></p>
22+
23+
<h3>Return value</h3>
24+
The return value is of type <code>CHARACTER</code> with a length of one.
25+
If the <var>KIND</var> argument is present, the return value is of the
26+
specified kind and of the default kind otherwise.
27+
28+
<br>
29+
30+
<h3>Example</h3>
31+
32+
<code class="smallexample" syntax="Packages/Fortran/grammars/FortranModern.sublime-syntax">
33+
<br>program test_achar
34+
<br>  character c
35+
<br>  c = achar(32)
36+
<br>end program test_achar</code>
37+
<br>
38+
39+
<h3>Notes</h3>
40+
See <a href="ICHAR.html#ICHAR">ICHAR</a> for a discussion of converting between numerical values
41+
and formatted string representations.
42+
43+
<br>
44+
45+
<h3>Standard</h3>
46+
Fortran 77 and later, with <var>KIND</var> argument Fortran 2003 and later
47+
48+
<br>
49+
50+
<h3>Class</h3>
51+
Elemental function
52+
53+
<br>
54+
55+
<h3>See also</h3>
56+
<a href="CHAR.html#CHAR">CHAR</a>, <a href="IACHAR.html#IACHAR">IACHAR</a>, <a href="ICHAR.html#ICHAR">ICHAR</a>
57+
58+

src/docs/ACOS.html

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<code>ACOS</code> — Arccosine function
2+
3+
<h3>Description</h3>
4+
<code>ACOS(X)</code> computes the arccosine of <var>X</var> (inverse of <code>COS(X)</code>).
5+
6+
<br>
7+
8+
<h3>Syntax</h3>
9+
<code>RESULT = ACOS(X)</code>
10+
11+
<br>
12+
13+
<h3>Arguments</h3>
14+
15+
<p><table summary=""><tbody><tr align="left"><td valign="top" width="15%"><var>X</var> </td><td valign="top" width="70%">The type shall either be <code>REAL</code> with a magnitude that is
16+
less than or equal to one - or the type shall be <code>COMPLEX</code>.
17+
<br></td></tr></tbody></table>
18+
19+
<br></p>
20+
21+
<h3>Return value</h3>
22+
The return value is of the same type and kind as <var>X</var>.
23+
The real part of the result is in radians and lies in the range
24+
0 \leq \Re \acos(x) \leq \pi.
25+
26+
<br>
27+
28+
<h3>Example</h3>
29+
30+
<code class="smallexample" syntax="Packages/Fortran/grammars/FortranModern.sublime-syntax">
31+
<br>program test_acos
32+
<br>  real(8) :: x = 0.866_8
33+
<br>  x = acos(x)
34+
<br>end program test_acos</code>
35+
<br>
36+
37+
<h3>Specific names</h3>
38+
39+
<p><table summary=""><tbody><tr align="left"><td valign="top" width="20%">Name </td><td valign="top" width="20%">Argument </td><td valign="top" width="20%">Return type </td><td valign="top" width="25%">Standard
40+
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>ACOS(X)</code> </td><td valign="top" width="20%"><code>REAL(4) X</code> </td><td valign="top" width="20%"><code>REAL(4)</code> </td><td valign="top" width="25%">Fortran 77 and later
41+
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>DACOS(X)</code> </td><td valign="top" width="20%"><code>REAL(8) X</code> </td><td valign="top" width="20%"><code>REAL(8)</code> </td><td valign="top" width="25%">Fortran 77 and later
42+
<br></td></tr></tbody></table>
43+
44+
<br></p>
45+
46+
<h3>Standard</h3>
47+
Fortran 77 and later, for a complex argument Fortran 2008 or later
48+
49+
<br>
50+
51+
<h3>Class</h3>
52+
Elemental function
53+
54+
<br>
55+
56+
<h3>See also</h3>
57+
Inverse function: <a href="COS.html#COS">COS</a>
58+
59+

src/docs/ACOSH.html

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<code>ACOSH</code> — Inverse hyperbolic cosine function
2+
3+
<h3>Description</h3>
4+
<code>ACOSH(X)</code> computes the inverse hyperbolic cosine of <var>X</var>.
5+
6+
<br>
7+
8+
<h3>Syntax</h3>
9+
<code>RESULT = ACOSH(X)</code>
10+
11+
<br>
12+
13+
<h3>Arguments</h3>
14+
15+
<p><table summary=""><tbody><tr align="left"><td valign="top" width="15%"><var>X</var> </td><td valign="top" width="70%">The type shall be <code>REAL</code> or <code>COMPLEX</code>.
16+
<br></td></tr></tbody></table>
17+
18+
<br></p>
19+
20+
<h3>Return value</h3>
21+
The return value has the same type and kind as <var>X</var>. If <var>X</var> is
22+
complex, the imaginary part of the result is in radians and lies between
23+
0 \leq \Im \acosh(x) \leq \pi.
24+
25+
<br>
26+
27+
<h3>Example</h3>
28+
29+
<code class="smallexample" syntax="Packages/Fortran/grammars/FortranModern.sublime-syntax">
30+
<br>PROGRAM test_acosh
31+
<br>  REAL(8), DIMENSION(3) :: x = (/ 1.0, 2.0, 3.0 /)
32+
<br>  WRITE (*,*) ACOSH(x)
33+
<br>END PROGRAM</code>
34+
<br>
35+
36+
<h3>Specific names</h3>
37+
38+
<p><table summary=""><tbody><tr align="left"><td valign="top" width="20%">Name </td><td valign="top" width="20%">Argument </td><td valign="top" width="20%">Return type </td><td valign="top" width="25%">Standard
39+
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>DACOSH(X)</code> </td><td valign="top" width="20%"><code>REAL(8) X</code> </td><td valign="top" width="20%"><code>REAL(8)</code> </td><td valign="top" width="25%">GNU extension
40+
<br></td></tr></tbody></table>
41+
42+
<br></p>
43+
44+
<h3>Standard</h3>
45+
Fortran 2008 and later
46+
47+
<br>
48+
49+
<h3>Class</h3>
50+
Elemental function
51+
52+
<br>
53+
54+
<h3>See also</h3>
55+
Inverse function: <a href="COSH.html#COSH">COSH</a>

0 commit comments

Comments
 (0)