Issue: Is it permissible to alter (e.g., assign a value to) a value parameter?
Hypothesis: It is possible to alter value parameters.
The Experiment: The params.cpp
source program is
set up as an experiment to test the hypothesis. This initial version of the
function change()
has value parameters which are assigned new
values within the function.
Question #8.1.1: If we're not allowed to change value parameters, what will the compiler likely do?
Keep in mind that we're only concerned now whether the compiler will allow us do this. We don't care (yet) what it actually does.
Observation: Compile your program.
Question #8.1.2: What do you observe when you compile the program? That is, did it compile or were there error messages?
Conclusions: Review the definition of a value parameter, and record your conclusions.
Question #8.1.3: Is our hypothesis correct? If it isn't correct, what should it be?