Quote:
|
Originally Posted by Astronouth7303
I don't know how it would be bad coding practice...
|
Well, minimizing the number of global variables is desirable because you don't have any control over the scope of a global variable. I've been involved with a few flight projects where there weren't any globally defined variables in the flight source code.
Quote:
|
Originally Posted by Astronouth7303
...any variable that needs to be accessable from 2 or more different functions must be declared globally.
|
No, this isn't true. You can pass a pointer to the variable in the function call.