adjustl not adding spaces at the end of the string
The current implementation of the intrinsic function adjustl
removes the spaces infront of the string, but it does not append the removed spaces to the back of the string.
According to the GCC docs,
ADJUSTL(STRING) will left adjust a string by removing leading spaces. Spaces are inserted at the end of the string as needed.
Example code:
program test_adjustl
character(len = 20) :: str = adjustl(" gfortran")
print *, "|"//str//"|"
end program test_adjustl
gfortran
output:
ubaid@ubaid-Lenovo-ideapad-330-15ARR:~/Desktop/My-Projects/GSoC/lfortran$ gfortran Testing/Temporary/main.f90
ubaid@ubaid-Lenovo-ideapad-330-15ARR:~/Desktop/My-Projects/GSoC/lfortran$ ./a.out
|gfortran |
lfortran
output:
ubaid@ubaid-Lenovo-ideapad-330-15ARR:~/Desktop/My-Projects/GSoC/lfortran$ ./src/bin/lfortran Testing/Temporary/main.f90
ubaid@ubaid-Lenovo-ideapad-330-15ARR:~/Desktop/My-Projects/GSoC/lfortran$ ./a.out
|gfortran|