Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program test
- implicit none
- integer :: i
- character(len=:), allocatable :: str
- character, allocatable :: str_array(:)
- str = "Hello, Fortran IRC channel!"
- str_array = [(str(i:i), i = 1, len(str))]
- str_array = pack(str_array, str_array /= " ")
- write(*,*) str_array
- end program
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement