
07-05-2003, 10:08 AM
|
|
Old Bee
|
 |
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
|
|
|
Yes, in some situations, precalculation is good. As in the example Kai showed. It would have to recalculate that value a lot of times in the for loop, while if it's set before the for loop, then it only needs to read the final value.
Of course, precalculating isn't always necassary. If you have an event that is only going to run one time, there isn't a need. |
|
|
|