This repository has been archived by the owner on Jun 8, 2023. It is now read-only.
Local variables needed in functions (help variables, temp variables, etc) #352
Labels
enhancement
New feature or request
The situation:
You create a function with parameters and a result.
Inside the function block you have to calculate several values by help variables (temporary variables, not needed outside). It is a logic catastrophe to use global (app) variables for this.
And in bigger projects you loose overview. Global variables only created for temporary use in function can cause severe problems, when you use the same name outside the function.
Of course you could implement additional parameters to use them as local variables. But that is not a proper solution.
Or you can construct a count loop that you do not use and use the names of the loop variables. But this is no real solution, because count-variables in loops also react global.
What do you think?
So we urgently need local variables!
As a teacher for computer science and book author I have problems to teach about functions and using global variables.
The text was updated successfully, but these errors were encountered: