![]() |
  |
|
2.4.2 The difference between Set and SetDelayed : an example Here is an example:
In both cases, an object (a or b) is assigned a random integer in the range 1 -10. But in the former case, it is computed at the moment of assignment and then is attached to <a>, while in the latter case it is recomputed afresh every time that b is called. We have also used one of the looping constructs Do, which we will cover shortly.
|
|||||||||||||||||