what
, lower
, upper
and
answer.in
. If the input does not satisfy all the conditions,
an appropriate error message is produced and the user is prompted
to provide input. This process is repeated until a valid input value
is entered.read.and.check(message = "", what = numeric(), lower, upper, answer.in,
default)
what
gives the type of data to be read.answer.in
, if supplied.default
argument is
specified, a blank line is accepted as valid input and in this case
read.and.check
returns the value of default
.