get_choice Subroutine

public subroutine get_choice(in, out)

FIXME : Add documentation

Arguments

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

Contents

Source Code


Source Code

  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