Fortran-90 generic routine GETVAL() for I/O API-3.2: compiler selects the appropriate type-specific form depending upon the number and types of the arguments:
<type> GETVAL() REAL*8 FUNCTION GETDBLE( LO, HI, DEFAULT, PROMPT ) REAL*8 , INTENT(IN ) :: LO , HI, DEFAULT CHARACTER*(*), INTENT(IN ) :: PROMPT END FUNCTION GETDBLE REAL*8 FUNCTION GETDBLE1( DEFAULT, PROMPT ) REAL*8 , INTENT(IN ) :: DEFAULT CHARACTER*(*), INTENT(IN ) :: PROMPT END FUNCTION GETDBLE1 INTEGER FUNCTION GETMENU( ITEMCNT, DEFAULT, PROMPT, CHOICES ) INTEGER , INTENT(IN ) :: ITEMCNT ! number of choices INTEGER , INTENT(IN ) :: DEFAULT ! default response CHARACTER*(*), INTENT(IN ) :: PROMPT ! prompt string CHARACTER*(*), INTENT(IN ) :: CHOICES ( * ) ! array of choice strings END FUNCTION GETMENU INTEGER FUNCTION GETNUM ( LO , HI , DEFAULT , PROMPT ) INTEGER , INTENT(IN ) :: LO, HI, DEFAULT CHARACTER*(*), INTENT(IN ) :: PROMPT END FUNCTION GETNUM INTEGER FUNCTION GETNUM1( DEFAULT , PROMPT ) INTEGER , INTENT(IN ) :: DEFAULT CHARACTER*(*), INTENT(IN ) :: PROMPT END FUNCTION GETNUM1 INTEGER(8) FUNCTION GETINT8( LO , HI , DEFAULT , PROMPT ) INTEGER(8) , INTENT(IN ) :: LO, HI, DEFAULT CHARACTER*(*), INTENT(IN ) :: PROMPT INTEGER(8) FUNCTION GETINT81( DEFAULT , PROMPT ) INTEGER(8) , INTENT(IN ) :: DEFAULT ! Default return value CHARACTER*(*), INTENT(IN ) :: PROMPT ! Prompt for user REAL FUNCTION GETREAL ( LO , HI , DEFAULT , PROMPT ) REAL , INTENT(IN ) :: LO , HI , DEFAULT CHARACTER*(*), INTENT(IN ) :: PROMPT END FUNCTION GETREAL REAL FUNCTION GETREAL1( DEFAULT , PROMPT ) REAL , INTENT(IN ) :: DEFAULT CHARACTER*(*), INTENT(IN ) :: PROMPT END FUNCTION GETREAL1 LOGICAL FUNCTION GETYN ( PROMPT , DEFAULT ) CHARACTER*(*), INTENT(IN ) :: PROMPT LOGICAL , INTENT(IN ) :: DEFAULT END FUNCTION GETYN
Call the individual routines; GETVAL() is a Fortran-90 generic only.
Prompt the user for a value, and return it, with optional lower and upper bounds on the return-value.For I/O API-3.2 and later, only.
For Fortran-90 declarations and interface checking:
USE M3UTILIOSee also the individual routinesGETDATE(),
GETDBLE() and GETDBLE1(),
GETMENU(),
GETNUM(), GETNUM1(), GETINT8(), and GETINT81(),
GETREAL() and GETREAL1(),
GETSTR(), and
GETYN().
To: Models-3/EDSS I/O API: The Help Pages