Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- recursive function Read_Line(in) result(srcLine)
- 40 type(Line), pointer :: srcLine
- 41 integer, intent(in) :: in
- 42 integer, parameter :: max_len = 1024
- 43 character(max_len, CH_) :: string
- 44 integer :: IO
- 45
- 46 read (in, "(a)", iostat=IO) string
- 47 call Handle_IO_Status(IO, "reading line from source code")
- 48 if (IO == 0) then
- 49 allocate (srcLine)
- 50 srcLine%Str = Trim(string)
- 51 srcLine%Next => Read_Line(in)
- 52 else
- 53 srcLine => Null()
- 54 end if
- 55 end function Read_Line
- 56 ! recursive function read_line(in) result (srcLine)
- 57 ! type(Line), pointer :: srcLine
- 58 ! character(*), intent(in) :: in
- 59 ! integer, parameter :: max_len = 1024
- 60 ! character(max_len,kind = CH_) :: string
- 61 ! integer :: IO
- 62 !
- 63 !
- 64 ! read(in,"(a)",iostat=IO) string
- 65 ! call Handle_IO_Status(IO,"reading line from file")
- 66 ! if (IO == 0) then
- 67 ! allocate(srcLine)
- 68 !
- 69 ! srcLine%Str = string
- 70 ! srcLine%next => read_line(in)
- 71 ! else
- 72 ! srcLine => Null()
- 73 ! end if
- 74 ! end function read_line
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement