REAL FUNCTION GETREAL( LO , HI , DEFAULT , PROMPT ) REAL LO ! Minimum allowed return value REAL HI ! Maximum allowed return value REAL DEFAULT ! Default return value CHARACTER*(*) PROMPT ! Prompt for user
PROMPT
to standard output for an integer
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]
See also GETDBLE() , GETMENU() , GETNUM() , GETSTR() , and GETYN() .
USE M3UTILIO
(See sample programs LATLON or PRESZ for additional usage examples.)
... REAL X REAL GETREAL ... X = GETREAL( 0.0, 10.0, 7.5, 'Give me a number between 0.0 and 10.0' ) ...
To: Models-3/EDSS I/O API: The Help Pages