in reply to Re^2: Recover a variable from a function
in thread Recover a variable from a function
Hi Chaoui05,
Yes, this approach is going to be a little more code - but only a few lines, depending on the specific case of course. However, as is often the case with such trade-offs, the little bit of time you spend writing a few more lines of code today may be much less than the time spent on debugging issues caused by misuse of global variables or the refactoring of the code as it grows more complex tomorrow.
Hope this helps,
-- Hauke D
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Recover a variable from a function
by Chaoui05 (Scribe) on May 19, 2016 at 08:40 UTC | |
by haukex (Archbishop) on May 19, 2016 at 08:44 UTC | |
by Chaoui05 (Scribe) on May 20, 2016 at 07:28 UTC |