This is similar in intention to readArrayData (subsection 7.2). The interface below covers most combinations.
interface readColDataToFixed subroutine readColToFixedNameReal32(tab, colName, colData) type(TableT), intent(in) :: tab character(*), intent(in) :: colName real(single), intent(out) :: colData(:) end subroutine readColToFixedNameReal32 subroutine readColToFixedNameReal64(tab, colName, colData) type(TableT), intent(in) :: tab character(*), intent(in) :: colName real(double), intent(out) :: colData(:) end subroutine readColToFixedNameReal64 subroutine readColToFixedNameInt8(tab, colName, colData) type(TableT), intent(in) :: tab character(*), intent(in) :: colName integer(int8), intent(out) :: colData(:) end subroutine readColToFixedNameInt8 subroutine readColToFixedNameInt16(tab, colName, colData) type(TableT), intent(in) :: tab character(*), intent(in) :: colName integer(int16), intent(out) :: colData(:) end subroutine readColToFixedNameInt16 subroutine readColToFixedNameInt32(tab, colName, colData) type(TableT), intent(in) :: tab character(*), intent(in) :: colName integer(int32), intent(out) :: colData(:) end subroutine readColToFixedNameInt32 subroutine readColToFixedNameStr(tab, colName, colData) type(TableT), intent(in) :: tab character(*), intent(in) :: colName character(*), intent(out) :: colData(:) end subroutine readColToFixedNameStr subroutine readColToFixedNameBool(tab, colName, colData) type(TableT), intent(in) :: tab character(*), intent(in) :: colName logical(bool), intent(out) :: colData(:) end subroutine readColToFixedNameBool subroutine readColToFixedCol2dReal32(col, colData) type(ColumnT), intent(in) :: col real(single), intent(out) :: colData(:,:) end subroutine readColToFixedCol2dReal32 subroutine readColToFixedCol2dReal64(col, colData) type(ColumnT), intent(in) :: col real(double), intent(out) :: colData(:,:) end subroutine readColToFixedCol2dReal64 subroutine readColToFixedColReal32(col, colData) type(ColumnT), intent(in) :: col real(single), intent(out) :: colData(:) end subroutine readColToFixedColReal32 subroutine readColToFixedColReal64(col, colData) type(ColumnT), intent(in) :: col real(double), intent(out) :: colData(:) end subroutine readColToFixedColReal64 subroutine readColToFixedColInt8(col, colData) type(ColumnT), intent(in) :: col integer(int8), intent(out) :: colData(:) end subroutine readColToFixedColInt8 subroutine readColToFixedColInt16(col, colData) type(ColumnT), intent(in) :: col integer(int16), intent(out) :: colData(:) end subroutine readColToFixedColInt16 subroutine readColToFixedColInt32(col, colData) type(ColumnT), intent(in) :: col integer(int32), intent(out) :: colData(:) end subroutine readColToFixedColInt32 subroutine readColToFixedColStr(col, colData) type(ColumnT), intent(in) :: col character(*), intent(out) :: colData(:) end subroutine readColToFixedColStr subroutine readColToFixedColBool(col, colData) type(ColumnT), intent(in) :: col logical(bool), intent(out) :: colData(:) end subroutine readColToFixedColBool end interface
The rules for conversion between datatypes are the same as for readArrayData (subsection 7.2). There is at present no conversion between non-string data and a string-valued `colData' argument.
Note that the argument `colData' is NOT a pointer and thus should be made the same size as the column to be read in the calling program.