loadtxt Interface

public interface loadtxt

Loads a 2D array from a text file (Specification)


Contents


Module Procedures

private subroutine loadtxt_rsp(filename, d)

Loads a 2D array from a text file.

Read more…

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: filename

The array 'd' will be automatically allocated with the correct dimensions

real(kind=sp), intent(out), allocatable:: d(:,:)

Example


 real(sp), allocatable :: data(:, :)
 call loadtxt("log.txt", data)  ! 'data' will be automatically allocated

Where 'log.txt' contains for example::

 1 2 3
 2 4 6
 8 9 10
 11 12 13
 ...

private subroutine loadtxt_rdp(filename, d)

Loads a 2D array from a text file.

Read more…

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: filename

The array 'd' will be automatically allocated with the correct dimensions

real(kind=dp), intent(out), allocatable:: d(:,:)

Example


 real(dp), allocatable :: data(:, :)
 call loadtxt("log.txt", data)  ! 'data' will be automatically allocated

Where 'log.txt' contains for example::

 1 2 3
 2 4 6
 8 9 10
 11 12 13
 ...

private subroutine loadtxt_rqp(filename, d)

Loads a 2D array from a text file.

Read more…

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: filename

The array 'd' will be automatically allocated with the correct dimensions

real(kind=qp), intent(out), allocatable:: d(:,:)

Example


 real(qp), allocatable :: data(:, :)
 call loadtxt("log.txt", data)  ! 'data' will be automatically allocated

Where 'log.txt' contains for example::

 1 2 3
 2 4 6
 8 9 10
 11 12 13
 ...

private subroutine loadtxt_iint8(filename, d)

Loads a 2D array from a text file.

Read more…

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: filename

The array 'd' will be automatically allocated with the correct dimensions

integer(kind=int8), intent(out), allocatable:: d(:,:)

Example


 integer(int8), allocatable :: data(:, :)
 call loadtxt("log.txt", data)  ! 'data' will be automatically allocated

Where 'log.txt' contains for example::

 1 2 3
 2 4 6
 8 9 10
 11 12 13
 ...

private subroutine loadtxt_iint16(filename, d)

Loads a 2D array from a text file.

Read more…

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: filename

The array 'd' will be automatically allocated with the correct dimensions

integer(kind=int16), intent(out), allocatable:: d(:,:)

Example


 integer(int16), allocatable :: data(:, :)
 call loadtxt("log.txt", data)  ! 'data' will be automatically allocated

Where 'log.txt' contains for example::

 1 2 3
 2 4 6
 8 9 10
 11 12 13
 ...

private subroutine loadtxt_iint32(filename, d)

Loads a 2D array from a text file.

Read more…

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: filename

The array 'd' will be automatically allocated with the correct dimensions

integer(kind=int32), intent(out), allocatable:: d(:,:)

Example


 integer(int32), allocatable :: data(:, :)
 call loadtxt("log.txt", data)  ! 'data' will be automatically allocated

Where 'log.txt' contains for example::

 1 2 3
 2 4 6
 8 9 10
 11 12 13
 ...

private subroutine loadtxt_iint64(filename, d)

Loads a 2D array from a text file.

Read more…

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: filename

The array 'd' will be automatically allocated with the correct dimensions

integer(kind=int64), intent(out), allocatable:: d(:,:)

Example


 integer(int64), allocatable :: data(:, :)
 call loadtxt("log.txt", data)  ! 'data' will be automatically allocated

Where 'log.txt' contains for example::

 1 2 3
 2 4 6
 8 9 10
 11 12 13
 ...

private subroutine loadtxt_csp(filename, d)

Loads a 2D array from a text file.

Read more…

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: filename

The array 'd' will be automatically allocated with the correct dimensions

complex(kind=sp), intent(out), allocatable:: d(:,:)

Example


 complex(sp), allocatable :: data(:, :)
 call loadtxt("log.txt", data)  ! 'data' will be automatically allocated

Where 'log.txt' contains for example::

 1 2 3
 2 4 6
 8 9 10
 11 12 13
 ...

private subroutine loadtxt_cdp(filename, d)

Loads a 2D array from a text file.

Read more…

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: filename

The array 'd' will be automatically allocated with the correct dimensions

complex(kind=dp), intent(out), allocatable:: d(:,:)

Example


 complex(dp), allocatable :: data(:, :)
 call loadtxt("log.txt", data)  ! 'data' will be automatically allocated

Where 'log.txt' contains for example::

 1 2 3
 2 4 6
 8 9 10
 11 12 13
 ...

private subroutine loadtxt_cqp(filename, d)

Loads a 2D array from a text file.

Read more…

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: filename

The array 'd' will be automatically allocated with the correct dimensions

complex(kind=qp), intent(out), allocatable:: d(:,:)

Example


 complex(qp), allocatable :: data(:, :)
 call loadtxt("log.txt", data)  ! 'data' will be automatically allocated

Where 'log.txt' contains for example::

 1 2 3
 2 4 6
 8 9 10
 11 12 13
 ...