!+ ! Function in4get1 (prompt, i1) result (istat) ! ! Prompt for and get 1 integer. ! Retry if ill formed. ! Return input value if entered. ! If "@" is the last non-blank character of prompt, "" will be substituted ! in plase of the "@" where "nnnn" is the default (input) value. ! ! Input: ! prompt -- Character(*): Prompt string. ! i1 -- Integer: Input value is default. ! ! Output: ! i1 -- Integer: Return value. ! istat -- Integer: Status. 1 = OK. -1 = 'QUIT' typed. !- function in4get1(prompt, i1) result (istat) implicit none integer i1, ivec(1), istat, in4getn character(*) prompt ! ivec(1)=i1 istat = in4getn(prompt, ivec, 1) i1=ivec(1) end function