Home Segments Index Top Previous Next

123: Mainline

Consider the convertToCaloriesWith: method, as defined in Segment 121, for example. When the convertToCaloriesWith: method is called, any existing values for other parameters that happen to be named caloriesPerGram are protected:

convertToCaloriesWith: fence------*   The values of caloriesPerGram 
| The value of caloriesPerGram    |   outside the fence, if any, 
| inside the fence is isolated    |   are isolated from the value 
| from values outside             |   inside 
|                                 | 
| The Method computes the value   | 
| of self * caloriesPerGram using | 
| the value of caloriesPerGram    | 
| inside this fence   	          | 
*---------------------------------*