User input is incoming parameter

The user input value is passed as a value parameter to the doSelection function each time it is called.  (See Listing 7.)

The function executes a selection structure to decide whether to return true or false.  (See Listing 8.)