Skip to content

Commit

Permalink
Move answers to reading from answers.tsv (4)
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Sep 25, 2024
1 parent 18c7f27 commit ae73893
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fortran/src/include/utils.f90
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ function get_data_file(filename) result(contents)
close(unit_number)
end function get_data_file

type(AnswerT) function get_answer(id) result(answer)
function get_answer(id) result(answer)
type(AnswerT) :: answer
integer(kind=4), intent(in) :: id
integer(kind=4) :: ios, row_start, row_end, line_length
integer(kind=8) :: i
Expand All @@ -61,7 +62,7 @@ type(AnswerT) function get_answer(id) result(answer)
read(type_, *, iostat=ios) i
if (ios /= 0) then
print *, "Invalid integer literal for id. Moving on without explicit error, but please debug this"
elseif (i == id_) then
elseif (i == id) then
select case (type_)
case ("int", "uint")
read(val, *, iostat=ios) i
Expand Down

0 comments on commit ae73893

Please sign in to comment.