Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/07/02 01:47
Read: times


 
#32097 - RE: KEIL: global variables
<html>

  1. if you declare the variable in one file and define it in another file, there is the potential to change the source line in one file but not the other. if a variable is going to be global anyway, why have a separate line in a source file? especially if you have many modules to keep track of?
    a keil support doc discusses this with the caveat "not necessarily recommended": GENERAL: DECLARING VARIABLES IN HEADER FILES
    recommended or not, i find it useful.

  2. here is a borland technical note that gets into the same topic (without the #defines): Managing Global Variables

  3. and, with keil, if you are using the _at_ keyword for fixed-address data, you will get an error if you try to include the header with the extern declarations in the module that has the definitions:
    C251: PROBLEMS INITIALIZING ABSOLUTELY LOCATED VARIABLES
<table><tr><td>james</td><td>
www.jameshinnant.com
</td></tr></table>
</html>


List of 11 messages in thread
TopicAuthorDate
KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table - James            01/01/70 00:00      
RE: KEIL: A-men Andy            01/01/70 00:00      
RE: KEIL: global variables            01/01/70 00:00      

Back to Subject List