FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | in | |||
integer, | intent(out) | :: | out |
subroutine get_choice (in, out)
implicit none
integer, intent (in) :: in
integer, intent (out) :: out
read (interactive_input, *, err=999) out
if (out <= 0) out = 0
if (out > in) out = 0
return
999 out = 0
end subroutine get_choice