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