joinpath(3f) - [M_io:PATHNAMES] join parts of a pathname together (LICENSE:PD)
Synopsis
Description
Options
Returns
Examples
Author
License
function joinpath(a1,a2,a3,a4,a5,a6,a7,a8,a9) result(path) character(len=*), intent(in) :: a1, a2 character(len=*), intent(in), optional :: a3, a4, a5, a6, a7, a8, a9 character(len=:), allocatable :: path
a1,a2 the first two pathname sections to join. Required a3-a9 additional optional sections to join
pathname sections joined together with trailing spaces removed from the ends of sections and a separator (as returned by separator(3f) ) placed between them, and duplicate adjacent separators removed accept for one beginning the joined pathname.
Sample program
program demo_joinpath use M_io, only : joinpath implicit none write(*,*)joinpath(& &/share/user,/man/,man3,joinpath.3m_io//.gz & &) end program demo_joinpathResults:
> /share/user/man/man3/joinpath.3m_io.gz
John S. Urban
Public Domain
Nemo Release 3.1 | joinpath (3) | February 23, 2025 |