]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/doc/gfortran/intrinsic-procedures/system.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / system.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. index:: SYSTEM, system, system call
7
8 .. _system:
9
10 SYSTEM --- Execute a shell command
11 **********************************
12
13 .. function:: SYSTEM(COMMAND)
14
15 Passes the command :samp:`{COMMAND}` to a shell (see ``system(3)``). If
16 argument :samp:`{STATUS}` is present, it contains the value returned by
17 ``system(3)``, which is presumably 0 if the shell command succeeded.
18 Note that which shell is used to invoke the command is system-dependent
19 and environment-dependent.
20
21 :param COMMAND:
22 Shall be of default ``CHARACTER`` type.
23
24 :param STATUS:
25 (Optional) Shall be of default ``INTEGER`` type.
26
27 Standard:
28 GNU extension
29
30 Class:
31 Subroutine, function
32
33 Syntax:
34 .. code-block:: fortran
35
36 CALL SYSTEM(COMMAND [, STATUS])
37 STATUS = SYSTEM(COMMAND)
38
39 See also:
40 :ref:`EXECUTE_COMMAND_LINE`, which is part of the Fortran 2008 standard
41 and should considered in new code for future portability.