How could I find the size of a dynamically allocated object path in subroutine newcase?
subroutine newcase(path)
character(:, kind=c_char),
& allocatable :: path
integer(kind=c_int) :: sizepath
write(*,*) "Trim Path: ", path, ":"
this% object = newcase_c(path, sizepath)
end subroutine newcase
The object is allocated when the subroutine is called as shown below:
character(256, kind=c_char) :: cwd
character(:, kind=c_char)
& , allocatable :: trimpath
call GETCWD(cwd)
trimpath = trim(cwd)
call newcase(trimpath)