??? 06/23/04 13:10 Read: times |
#73004 - RE: Static Local Variable Vs Global Variable Responding to: ???'s previous message |
We have 4 people working on this project and I want to have a variable which can be altered by my function & can be accessed by other's functions as readonly. :-)
If the variable is local to "my function" and all "read only functions" are called by "my function" the rule that no function can alter what is in the call parametres kick in, that would be a solution. Your problem above is quite common and often the only way to handle it is to do it manually such as calling the variable something like DoNotAlterVariable. Often we search in the tools for a solution to something that still require that we think ARGH!. I have rules for naming variables that illustrate the scope and have seen programs totally messed up becuase such rules were not implemented. To verify such it is essential that you have an editor such as CodeWright that allow you to do a global search for a project. Erik |
Topic | Author | Date |
Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
Not 8051-Specific | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable![]() | 01/01/70 00:00 |