'
REAL*8 FUNCTION GETDBLE( LO , HI , DEFAULT , PROMPT ) REAL*8 LO ! Minimum allowed return value REAL*8 HI ! Maximum allowed return value REAL*8 DEFAULT ! Default return value CHARACTER*(*) PROMPT ! Prompt for user
PROMPT
to standard output for a double
precision number between LO
and HI
,
get the user's response and check that it is within range. Return
DEFAULT
if the user hits <RET>. Reprompts on
error for up to 5 attempts; exits in case of more than 5 entry
errors. If environment variable
PROMPTFLAG is set to "N", returns
DEFAULT
without prompting the user. Logs the value
returned, for tracking and validation purposes.
The default is displayed in square brackets at the end of the
prompt [LIKE THIS]
For Fortran-90 declarations and interface checking:
USE M3UTILIO
See also GETREAL() , GETMENU() , GETNUM() , GETSTR() , and GETYN() .
... REAL*8 X REAL*8 GETDBLE ... X = GETDBLE( 0.0D0, 10.0D0, 7.5D0, & 'Give me a number between 0.0 and 10.0' ) ...
To: Models-3/EDSS I/O API: The Help Pages