getline Interface

public interface getline

Read a whole line from a formatted unit into a string variable


Module Procedures

private subroutine getline_char(unit, line, iostat, iomsg)

Read a whole line from a formatted unit into a deferred length character variable

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: unit

Formatted IO unit

character(len=:), intent(out), allocatable :: line

Line to read

integer, intent(out), optional :: iostat

Status of operation

character(len=:), optional, allocatable :: iomsg

Error message

private subroutine getline_string(unit, line, iostat, iomsg)

Read a whole line from a formatted unit into a string variable

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: unit

Formatted IO unit

type(string_type), intent(out) :: line

Line to read

integer, intent(out), optional :: iostat

Status of operation

character(len=:), optional, allocatable :: iomsg

Error message

private subroutine getline_input_char(line, iostat, iomsg)

Read a whole line from the standard input into a deferred length character variable

Arguments

Type IntentOptional Attributes Name
character(len=:), intent(out), allocatable :: line

Line to read

integer, intent(out), optional :: iostat

Status of operation

character(len=:), optional, allocatable :: iomsg

Error message

private subroutine getline_input_string(line, iostat, iomsg)

Read a whole line from the standard input into a string variable

Arguments

Type IntentOptional Attributes Name
type(string_type), intent(out) :: line

Line to read

integer, intent(out), optional :: iostat

Status of operation

character(len=:), optional, allocatable :: iomsg

Error message