| ??? 11/27/02 01:19 Read: times |
#33249 - RE: local global???!!!?!?!?! |
Andy Neil wrote: ------------------------------- Variables defined at file scope (ie, outside all functions in a file) are, by default, global (ie, accessible outside the file) This is only true if you declare the variable with the extern keyword in the other file you want to use it in so that the compiler looks for it elswhare and not complain. However, you can limit their scope to only the defining file by use of the static keyword; the symbol is then inaccessible outside the file that is true, with keil compiler if i define a static global variable in one file and declare it extern in the other file i get error message, I didn't know why at the time because the error message had nothing to do with what you said. Now I understand why thanks Andy. Regards Mahmood |
| Topic | Author | Date |
| C++ style in C | 01/01/70 00:00 | |
| RE: C++ style in C | 01/01/70 00:00 | |
| RE: C++ style in C | 01/01/70 00:00 | |
| RE: C++ style in C | 01/01/70 00:00 | |
| RE: C++ style in C | 01/01/70 00:00 | |
| RE: C++ style in C | 01/01/70 00:00 | |
| RE: C++ style in C. mahmood | 01/01/70 00:00 | |
| RE: C++ style in C/ Erik | 01/01/70 00:00 | |
| RE: C++ style in C. mahmood | 01/01/70 00:00 | |
| RE: C++ style in C. mahmood | 01/01/70 00:00 | |
| RE: C++ style in C. mahmood | 01/01/70 00:00 | |
| RE: C++ style in C/ Erik | 01/01/70 00:00 | |
| RE: C++ style in C. mahmood | 01/01/70 00:00 | |
| RE: C++ style in C. mahmood | 01/01/70 00:00 | |
| RE: C++ style in C. mahmood | 01/01/70 00:00 | |
| RE: C++ style in C. mahmood | 01/01/70 00:00 | |
| RE: C++ style in C. //Judy / Erik | 01/01/70 00:00 | |
| RE: C++ style in C. mahmood | 01/01/70 00:00 | |
| RE: C++ style in C. Erik | 01/01/70 00:00 | |
| RE: local global???!!!?!?!?! | 01/01/70 00:00 | |
| RE: local global???!!!?!?!?! | 01/01/70 00:00 | |
| RE: local global???!!!?!?!?! | 01/01/70 00:00 | |
| RE: C++ style in C | 01/01/70 00:00 | |
RE: C++ style in C. mahmood | 01/01/70 00:00 |



