]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/doc/gfortran/intrinsic-procedures/rename.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / rename.rst
CommitLineData
c63539ff
ML
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:: RENAME, file system, rename file
7
8.. _rename:
9
10RENAME --- Rename a file
11************************
12
13.. function:: RENAME(PATH1, PATH2)
14
15 Renames a file from file :samp:`{PATH1}` to :samp:`{PATH2}`. A null
16 character (``CHAR(0)``) can be used to mark the end of the names in
17 :samp:`{PATH1}` and :samp:`{PATH2}` ; otherwise, trailing blanks in the file
18 names are ignored. If the :samp:`{STATUS}` argument is supplied, it
19 contains 0 on success or a nonzero error code upon return; see
20 ``rename(2)``.
21
22 :param PATH1:
23 Shall be of default ``CHARACTER`` type.
24
25 :param PATH2:
26 Shall be of default ``CHARACTER`` type.
27
28 :param STATUS:
29 (Optional) Shall be of default ``INTEGER`` type.
30
31 Standard:
32 GNU extension
33
34 Class:
35 Subroutine, function
36
37 Syntax:
38 .. code-block:: fortran
39
40 CALL RENAME(PATH1, PATH2 [, STATUS])
41 STATUS = RENAME(PATH1, PATH2)
42
43 See also:
3ed1b4ce 44 :ref:`LINK`