Subroutine that creates a path from vector of folders
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=:), | intent(out), | allocatable | :: | file_path | ||
character(len=512), | intent(in), | dimension(:) | :: | vec_path |
subroutine vec2path(file_path, vec_path) !! Subroutine that creates a path from vector of folders implicit none character(len = : ), intent(out), allocatable :: file_path character(len = 512), intent(in ), dimension(:) :: vec_path character(len = 1) :: sep integer(kind = I4) :: k sep = dir_separator() file_path = '' do k = 1, size(vec_path) file_path = file_path // sep // trim( vec_path(k) ) enddo return endsubroutine vec2path