Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program test
- use iso_fortran_env, only: int64, real64
- implicit none
- integer :: i
- integer(int64) :: t0, t1, rate
- real(real64) :: dt
- character(len=50000) :: str
- character, allocatable :: str_array(:)
- read(*,"(a)") str
- call system_clock(t0, rate)
- str_array = [(str(i:i), i = 1, len(str))]
- str_array = pack(str_array, str_array /= " ")
- call system_clock(t1, rate)
- dt = (t1 - t0)/(1.0d0*rate)
- write(*,*) str_array(1:80)
- write(*,*) dt
- end program
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement