<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>CodeWarrior for MCUのトピックRe: Global Variables and constants</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138651#M2201</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;BLOCKQUOTE dir="ltr"&gt;&lt;P&gt;bigmac wrote:&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Steve,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;FONT size="2"&gt;Steve Russell wrote&lt;/FONT&gt;:&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="3"&gt;A &lt;STRONG&gt;definition&lt;/STRONG&gt; creates a definite place for a C variable or function and completely describes it. It includes all the information in a declaration, but has the additional information of the variable initial value or a function body&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;So the difference between a declaration and a definition would seem to be a moot point for simple global variables that use implicit (default) initialisation to zero.&lt;/FONT&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="2"&gt;Regards,&lt;BR /&gt;Mac&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT size="3"&gt;Not if you want a non-zero initial value.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;My main point was that you will get extra confused when reading C specifications and discussions if you don't appreciate the difference between declaration and definition.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I confess, I don't remember exactly why the use of the implicit initialization is discouraged by some authorities.&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 11 Jun 2006 23:50:52 GMT</pubDate>
    <dc:creator>SteveRussell</dc:creator>
    <dc:date>2006-06-11T23:50:52Z</dc:date>
    <item>
      <title>HC08: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138646#M2196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I recently changed from V3.2 to 5.0 Codewarrior for the HC08. I am having trouble getting code to compile in the new version that worked in the old. My main code is located in a file called pacer.c. I have global var's that I use in my main routine and other modules called utilities.c and events.c. I put all my global vars and constants in a file called globals.h&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I now get duplicate definitions when I include the globals.h file in the utilities.c module. If I do not include the globals.h file in the utilities.c module I get not declared errors for the variables. I have been programming C for a few years now and still seem to have troubles with this. I have checked all my books and reference material and I keep getting different answers. Some say the vars have to be declared as external in the header file and declared as just the type in the module they are used in. Then others say just the opposite. It&amp;nbsp;works better in codewarrior if I use&amp;nbsp;only the type as byte, int, etc in the header file (globals.h) and the extern in the module it is being used in.&amp;nbsp;Is there a general discussion on this somewhere. I do not mind the research. I just cant figure out what is the correct (ANSI) method. Here is a cop of my globals.h file&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#ifndef __globals&lt;BR /&gt;#define __globals&lt;/DIV&gt;&lt;DIV&gt;// Global variables&lt;BR /&gt;unsigned int Delay10ms;&lt;BR /&gt;byte WaitTime;&lt;BR /&gt;byte ProgramCount;&lt;BR /&gt;byte Level;&lt;BR /&gt;byte key;&lt;BR /&gt;byte Count2Sec;&lt;BR /&gt;byte kb_flag; //used to indicate keyboard status&lt;BR /&gt;byte keyval;&amp;nbsp;//Value of pressed key&lt;/DIV&gt;&lt;DIV&gt;//setup for the different Modes used in the program&lt;BR /&gt;byte Mode;&lt;BR /&gt;#define run&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Run Mode&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;#define program&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Program Mode&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;#define sleep&amp;nbsp;&amp;nbsp;3&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Sleep Mode */&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;#define Key_Mode&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Keyboard Value for mode switch */&lt;BR /&gt;#define Key_Up&amp;nbsp;&amp;nbsp;&amp;nbsp;2&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Keyboard Value for Up switch */&lt;BR /&gt;#define Key_Down&amp;nbsp;&amp;nbsp;4&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Keyboard Value for Down switch */&lt;BR /&gt;#define Key_Standby&amp;nbsp;8&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Keyboard Value for program switch */&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;#endif //__globals&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;Any ideas? Thanks!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;BCDE&lt;/DIV&gt;&lt;P&gt;Message Edited by CrasyCat on &lt;SPAN class="date_text"&gt;2007-04-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;02:20 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jun 2006 05:58:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138646#M2196</guid>
      <dc:creator>bespenschied</dc:creator>
      <dc:date>2006-06-07T05:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138647#M2197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello bespenschied,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;I assume that your &lt;FONT face="Courier New"&gt;globals.h&lt;/FONT&gt; file is included near the start of your &lt;FONT face="Courier New"&gt;pacer.c&lt;/FONT&gt; file.&amp;nbsp; This would provided the declaration for the global variables.&amp;nbsp; However, when you use some of these variables within the file &lt;FONT face="Courier New"&gt;utilities.c&lt;/FONT&gt;, they need to be declared as external within that file.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Modifying the &lt;FONT face="Courier New"&gt;globals.h&lt;/FONT&gt; file&amp;nbsp;in the following&amp;nbsp;manner&amp;nbsp;might also work -&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;#ifndef __globals&lt;BR /&gt;#define __globals&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;// Global variables&lt;BR /&gt;unsigned int Delay10ms;&lt;BR /&gt;byte WaitTime;&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;#else&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;extern unsigned int Delay10ms;&lt;BR /&gt;extern byte WaitTime;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;FONT face="Courier New"&gt;#endif //__globals&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;A short discussion on global variables is given in the attached document.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;BR /&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Message Edited by bigmac on &lt;SPAN class="date_text"&gt;2006-06-07&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;04:11 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jun 2006 13:08:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138647#M2197</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2006-06-07T13:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138648#M2198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Thanks for the help. I will read the document and try your suggestions. I also figured out that when you put constants like #define run 0 in the same header file as globals this causes problems because they are handled differently when compiled. I split the 2 up and now have a constants header file and a globals header file. It seemed to stop the errors I was getting.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Jun 2006 02:10:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138648#M2198</guid>
      <dc:creator>bespenschied</dc:creator>
      <dc:date>2006-06-10T02:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138649#M2199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="3"&gt;To really understand the way C documentation describes these things, you need to keep in mind the difference between a &lt;STRONG&gt;definition&lt;/STRONG&gt; and a &lt;STRONG&gt;declaration&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;A &lt;STRONG&gt;declaration&lt;/STRONG&gt; just gives C just enough information to correctly reference a variable or function.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;A &lt;STRONG&gt;definition&lt;/STRONG&gt; creates a definite place for a C variable or function and completely describes it. It includes all the information in a declaration, but has the additional information of the variable initial value or a function body&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;One of the reasons for the confusion in the documentation is that C will automatically create an instance of an extern variable which has no definition, just several extern declarations.&amp;nbsp;The feature is one of those historical parts of C that still works, but is no longer recommended for use.&lt;/FONT&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="3"&gt;A slightly different convention, which seems to give better documentation is to have the "globals.h" file of the form:&lt;/FONT&gt;&lt;/P&gt;&lt;BLOCKQUOTE dir="ltr"&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="3"&gt;#ifndef __globals #define __globals&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="3"&gt;// Global variables, declarations&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="3"&gt;exterm unsigned int&amp;nbsp; Delay10ms;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="3"&gt;extern byte&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WaitTime;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="3"&gt;#endif //__globals&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;And a globals.c file of the form:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;/FONT&gt; &lt;BLOCKQUOTE dir="ltr"&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;#include "globals'h"&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;// Global variables, Actual definition&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;unsigned int Delay10ms = 10 ;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;byte&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WaitTime&amp;nbsp; = 5 ;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="3"&gt;As the program gets larger, you can share variables between several modules in a program without making them truly global.&amp;nbsp; This is done in a similar style.&amp;nbsp;&amp;nbsp;In this case it is common to place the actual definition in some module that "owns" the variables.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="3"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="3"&gt;The modules using the variables are easily identified by the presence of the include file that contains the declarations.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Jun 2006 01:33:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138649#M2199</guid>
      <dc:creator>SteveRussell</dc:creator>
      <dc:date>2006-06-11T01:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138650#M2200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Steve,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;FONT size="2"&gt;Steve Russell wrote&lt;/FONT&gt;:&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="3"&gt;A &lt;STRONG&gt;definition&lt;/STRONG&gt; creates a definite place for a C variable or function and completely describes it. It includes all the information in a declaration, but has the additional information of the variable initial value or a function body&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;So the difference between a declaration and a definition would seem to be a moot point for simple global variables that use implicit (default) initialisation to zero.&lt;/FONT&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="2"&gt;Regards,&lt;BR /&gt;Mac&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Jun 2006 09:26:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138650#M2200</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2006-06-11T09:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138651#M2201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;BLOCKQUOTE dir="ltr"&gt;&lt;P&gt;bigmac wrote:&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Steve,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;FONT size="2"&gt;Steve Russell wrote&lt;/FONT&gt;:&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="3"&gt;A &lt;STRONG&gt;definition&lt;/STRONG&gt; creates a definite place for a C variable or function and completely describes it. It includes all the information in a declaration, but has the additional information of the variable initial value or a function body&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;So the difference between a declaration and a definition would seem to be a moot point for simple global variables that use implicit (default) initialisation to zero.&lt;/FONT&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="2"&gt;Regards,&lt;BR /&gt;Mac&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT size="3"&gt;Not if you want a non-zero initial value.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;My main point was that you will get extra confused when reading C specifications and discussions if you don't appreciate the difference between declaration and definition.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I confess, I don't remember exactly why the use of the implicit initialization is discouraged by some authorities.&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Jun 2006 23:50:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138651#M2201</guid>
      <dc:creator>SteveRussell</dc:creator>
      <dc:date>2006-06-11T23:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138652#M2202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;One way to make handling of global variables easier is to use the following approach:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;in globals.h#if ALLOC#define GLOBAL#else#define GLOBAL extern#endifGLOBAL char global_variable;
GLOBAL int  another_global_variable;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;in main.c#define ALLOC 1#include "globals.h"&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;in the rest of the c-files#define ALLOC 0#include "globals.h"&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2006 15:11:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138652#M2202</guid>
      <dc:creator>Sten</dc:creator>
      <dc:date>2006-06-12T15:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138653#M2203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="2"&gt;Hello Steve,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I am still a little confused over the declaration/definition issue for global variables.&amp;nbsp; Let's assume that we only have one file, say main.c.&amp;nbsp; From your previous comments, I presume that the following code would be necessary, outside of any function, to declare/define a single global variable &lt;FONT face="Courier New"&gt;global_var1.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;int global_var1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Declaration?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;int global_var1 = 0;&amp;nbsp;// Definition?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;void main(void)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;etc.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Is this the correct interpretation of your previous explanation?&amp;nbsp; Is it also allowable to combine the declaration and definition as a single assignment?&amp;nbsp; Now I would assume that both the declaration and definition can only occur once in a program (there can only be a single initial value).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;However, if we now add a second file that references the same global variable, I have previously understood that we need to tell the compiler to look for the declaration of the variable elsewhere.&amp;nbsp; So the new file would need to include the following prior to first use of the variable, and this would occur for all additional files that use the variable:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;extern int global_var1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Is this&amp;nbsp;correct?&amp;nbsp; I am not sure whether this counts as a declaration, a definition, or something completely different.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Clarification of these simple cases would give a fuller understanding of&amp;nbsp;more complex cases, such as global structures.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Regards,&lt;BR /&gt;Mac&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2006 22:22:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138653#M2203</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2006-06-12T22:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138654#M2204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="3"&gt;Mac,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I'm sorry, I should have given&amp;nbsp;some examples.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I was trying to give informal definitions of the terms.&amp;nbsp; Look&amp;nbsp;"declaration" and "definition" up in&amp;nbsp;you favorite C book&amp;nbsp; for different wording.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;A &lt;STRONG&gt;declaration&lt;/STRONG&gt; just gives C just enough information to correctly reference a variable or function.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;As in:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;FONT size="3"&gt;&lt;FONT size="3"&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;extern int foo;             // declaration    double sin( double arg ) ;  // declaration&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;The compiler gets enough information to &lt;STRONG&gt;reference&lt;/STRONG&gt; the&amp;nbsp;variable or function, but it is up to the linker to find&amp;nbsp;where the actual variable or the function body is.&lt;BR /&gt;&lt;/FONT&gt;&amp;nbsp;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;FONT size="3"&gt;&lt;FONT size="3"&gt;A &lt;STRONG&gt;definition&lt;/STRONG&gt; creates a definite place for a C variable or function and completely describes it. It includes &lt;STRONG&gt;all the information in a declaration&lt;/STRONG&gt;, but has the additional information of the variable initial value or a function body&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;int foo ;    // definition tells compiler "put foo here"// definition tells compiler "put the sin function here,// with this definitiondouble sin( double arg ) { /* much code */} ;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Actually gives the storage location or the function body.&lt;/FONT&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;bigmac wrote:&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="2"&gt;Hello Steve,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I am still a little confused over the declaration/definition issue for global variables.&amp;nbsp; Let's assume that we only have one file, say main.c.&amp;nbsp; From your previous comments, I presume that the following code would be necessary, outside of any function, to declare/define a single global variable &lt;FONT face="Courier New"&gt;global_var1.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;int global_var1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Declaration?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;Actually a definition without an initializer given&lt;/STRONG&gt;&lt;/FONT&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;int global_var1 = 0;&amp;nbsp;// Definition?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;Yes, also a definition&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;void main(void)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;etc.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Is this the correct interpretation of your previous explanation?&amp;nbsp; Is it also allowable to combine the declaration and definition as a single assignment?&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;You can't avoid it.&amp;nbsp; A definition includes all the information in a declaration, and more&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Now I would assume that both the declaration and definition can only occur once in a program (there can only be a single initial value).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Its good practice to have only one declaration for an item in a module, but many are allowed, if they all agree.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;So, for example if you have a declaration for a function in a header file, it is helpful to include that header file in the module that defines the function.&amp;nbsp; The compiler will report an error if the header file declaration doesn't match the definition.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;You can only have one definition of something global in a program.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;However, if we now add a second file that references the same global variable, I have previously understood that we need to tell the compiler to look for the declaration of the variable elsewhere.&amp;nbsp; So the new file would need to include the following prior to first use of the variable, and this would occur for all additional files that use the variable:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;extern int global_var1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;You are correct. This is indeed a declaration&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2006 00:44:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138654#M2204</guid>
      <dc:creator>SteveRussell</dc:creator>
      <dc:date>2006-06-13T00:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138655#M2205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I started this thread in June and am just now getting back to read all the other posts. I have ADD and often get sidetracked.....&lt;BR /&gt;&lt;BR /&gt;Anhow I really appreciate all the discussion on this topic that all of you gave. It didn't make sense why I had to treat the definitions different depending on which module was using it. bigmac's example makes sense but did not work. I still got an error saying the symbol was duplicated.&lt;BR /&gt;&lt;BR /&gt;#ifndef __globals&lt;BR /&gt;#define __globals&lt;BR /&gt;// Global variables&lt;BR /&gt;unsigned int Delay10ms;&lt;BR /&gt;byte WaitTime;&lt;BR /&gt; &lt;BR /&gt;#else&lt;BR /&gt;extern unsigned int Delay10ms;&lt;BR /&gt;extern byte WaitTime;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;#endif //__globals&lt;BR /&gt;&lt;BR /&gt;Does the #define __globals command give __globals a value that remains active during the whole compiling process or just the current file? When I changed my code as above, it appears that the __globals is undefined when it gets used by the main.c (the first module to call it) and it uses &lt;BR /&gt;&lt;BR /&gt;unsigned int Delay10ms; &lt;BR /&gt;&lt;BR /&gt;to define the Delay10ms global Value and the __globals is now defined. When the 2nd module calls it, utilities.c, I would think the __globals is now defined and should use&lt;BR /&gt;&lt;BR /&gt;extern unsigned int Delay10ms; &lt;BR /&gt;&lt;BR /&gt;to define Delay10ms. If this was the case I should not be getting the error:&lt;BR /&gt;L1818: Symbol 14 - Delay10ms duplicated in Utility.c.o and PacerV1.3.c.o&lt;BR /&gt;L1818: Symbol 15 - WaitTime duplicated in Utility.c.o and PacerV1.3.c.o&lt;BR /&gt;&lt;BR /&gt;I did what I thought Steve Russel suggested and created 2 files. In the globals.h file I put:&lt;BR /&gt;&lt;BR /&gt;#ifndef __globals&lt;BR /&gt;#define __globals&lt;BR /&gt;// Global variables&lt;BR /&gt;unsigned int Delay10ms;&lt;BR /&gt;byte WaitTime;&lt;BR /&gt;#endif //__globals&lt;BR /&gt;&lt;BR /&gt;In the globals.c file I put:&lt;BR /&gt;// Global variables&lt;BR /&gt;extern unsigned int Delay10ms;&lt;BR /&gt;extern byte WaitTime;&lt;BR /&gt;&lt;BR /&gt;I use &lt;BR /&gt;&lt;BR /&gt;#include "globals.h"&lt;BR /&gt;&lt;BR /&gt;in my main.c module and I use &lt;BR /&gt;&lt;BR /&gt;#include "globals.c"&lt;BR /&gt;&lt;BR /&gt;in all modules that need the global variables. This method works but makes it necessary to edit 2 files every time I need to change any Global variables.&lt;BR /&gt;&lt;BR /&gt;Sten's example using #define ALLOC 1 worked but again means remembering to add the #define ALLOC 0 to all modules that need the Global vars.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks again.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Sep 2006 11:48:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138655#M2205</guid>
      <dc:creator>bespenschied</dc:creator>
      <dc:date>2006-09-02T11:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138656#M2206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;The #define __globals command is valid only for the current compilation unit. A compilation unit is a source file and all the header files included there.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So when you build utility.c, the macro __globals is undefined again.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In order to be able to build your application you have to get following code in main.c:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#undef __globals&lt;/DIV&gt;&lt;DIV&gt;#include "globals.h"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In all other C modules you need to get&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;#define __globals&lt;/DIV&gt;&lt;DIV&gt;#include "globals.h"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2006 15:24:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138656#M2206</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-09-04T15:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138657#M2207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Just to put a slightly different perspective on this issue, it can be helpful to think of the variable definition as the equivalent of a function body, and the declaration as its prototype.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;A&amp;nbsp;function body appears in just one .c file, while its prototype appears in one .h file but can&amp;nbsp;be &lt;FONT face="Courier New"&gt;#include&lt;/FONT&gt;d multiple times. Similarly, a variable definition (which may include an initialiser) may only occur in a single .c file, while its declaration (which must include the "&lt;FONT face="Courier New"&gt;extern&lt;/FONT&gt;" keyword) will typically occur in a single .h file and be &lt;FONT face="Courier New"&gt;#include&lt;/FONT&gt;d as necessary.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;To comment on a couple of the suggestions put forward in this thread, we use MISRA-C, which does not recommend (a) putting definitions in .h files, and (b) using &lt;FONT face="Courier New"&gt;#undef&lt;/FONT&gt;.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So to summarise, the way we would declare, define and use a global variable is as follows:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Global.h:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;#ifndef GLOBAL_H&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;#define GLOBAL_H&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;extern u8 Global_u8MyVar; /* declaration */&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;#endif&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Global.c&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;#include "Global.h"&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;u8 Global_u8MyVar = 0; /* definition + optional initialisation */&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;MyFile.c&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;#include "Global.h"&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;void MyFile_MyFunc(u8 u8MyOtherVar)&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;{&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp;Global_u8MyVar = u8MyOtherVar + 1; /* use */&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;} /* MyFile_MyFunc */&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Steve M.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2006 15:56:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138657#M2207</guid>
      <dc:creator>sjmelnikoff</dc:creator>
      <dc:date>2006-09-04T15:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138658#M2208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Steve,&lt;BR /&gt;&lt;BR /&gt;From your summary, when does Global.c ever get used? and if I had a utilities.c file how would I Include the global declarations in it?&lt;BR /&gt;&lt;BR /&gt;CrasyCat,&lt;BR /&gt;&lt;BR /&gt;Thanks, It makes sense knowing that the __ commands are not global and only exist in the current compilation unit. That is why my original attempt did not work.&lt;BR /&gt;&lt;BR /&gt;From your example:&lt;BR /&gt;&lt;BR /&gt;#undef __globals&lt;BR /&gt;#include "globals.h"&lt;BR /&gt; &lt;BR /&gt;In all other C modules you need to get&lt;BR /&gt;#define __globals&lt;BR /&gt;#include "globals.h"&lt;BR /&gt;&lt;BR /&gt;What does this do? Does it make the __globals visible in all units?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2006 12:13:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138658#M2208</guid>
      <dc:creator>bespenschied</dc:creator>
      <dc:date>2006-09-06T12:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138659#M2209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;In fact the idea is to have __globals undefined when building one source file in the application and to define it for all other compilation units.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So when you are writing:&lt;/DIV&gt;#undef __globals&lt;BR /&gt;#include "globals.h"&lt;BR /&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Variables will be defined&lt;/DIV&gt;&lt;DIV&gt;(unsigned int Delay10ms;&lt;BR /&gt;byte WaitTime&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When you write&lt;/DIV&gt;#define __globals&lt;BR /&gt;#include "globals.h"&lt;BR /&gt;&lt;DIV&gt;&amp;nbsp;variables will be declared&lt;/DIV&gt;&lt;DIV&gt;(extern unsigned int Delay10ms;&lt;BR /&gt;extern byte WaitTime&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So you need to have the line #define __globals prior to each #include "globals.h" statement in all source file except one (the one where th definition should take place.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2006 17:26:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138659#M2209</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-09-06T17:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138660#M2210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;HR /&gt;bespenschied wrote:&lt;BR /&gt;&lt;BR /&gt;From your summary, when does Global.c ever get used? and if I had a utilities.c file how would I Include the global declarations in it?&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;If you think of&amp;nbsp;the global variable as being a bit like a global function, the purpose of Global.c is to allocate space for the variable (analogous to a function definition),&amp;nbsp;while the purpose of Global.h is to announce that the variable exists and can be used (analogous to a function declaration).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Global.c is "used" whenever any other module accesses the global variable.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The global variable can be used in utilities.c simply by #including Global.h, as illustrated in the example in my earlier post.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Steve M.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2006 15:17:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138660#M2210</guid>
      <dc:creator>sjmelnikoff</dc:creator>
      <dc:date>2006-09-11T15:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138661#M2211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks for all the help. It makes sense now. I hope others have gained some insite to this confusion also.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 13:02:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138661#M2211</guid>
      <dc:creator>bespenschied</dc:creator>
      <dc:date>2006-09-14T13:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138662#M2212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am still completely not getting this. What used to be easy in just creating a library file with extern blah and then including that library file in my main C program and being able to call that variable in all of my other C files, has turned into this&amp;nbsp; L1818 duplicated in file1.c and file2.c&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a file adc.h that has the following&lt;/P&gt;&lt;P&gt;//start of adc.h&lt;/P&gt;&lt;P&gt;#ifndef __adc&lt;BR /&gt;#define __adc&lt;BR /&gt;extern&amp;nbsp; int state;&lt;BR /&gt;extern&amp;nbsp; unsigned long adclow=0;&amp;nbsp;&amp;nbsp; // store a/d low 8 bits&lt;BR /&gt;extern&amp;nbsp; unsigned long adchigh=0;&amp;nbsp; // store a/d high 8 bits&lt;BR /&gt;extern&amp;nbsp; unsigned long adcRTD=0;&amp;nbsp;&amp;nbsp; //store a/d RTD total in decimal&lt;BR /&gt;extern&amp;nbsp; unsigned long adcR=0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //store a/d Resistance total in decimal&lt;BR /&gt;extern&amp;nbsp; int RTD_Read_Times = 0;&lt;BR /&gt;extern&amp;nbsp; float RTD1;&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;//end of adc.h&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a file adc.c that has the following include&lt;/P&gt;&lt;P&gt;//start of adc.c&lt;/P&gt;&lt;P&gt;#include "adc.h"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;float adc_to_tempC(int test) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch(state) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case 0: break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default : break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;//END of adc.c&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a main.c file that has the following&lt;/P&gt;&lt;P&gt;#include "adc.h"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void main{&lt;/P&gt;&lt;P&gt;&amp;nbsp;state++;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I compile, it will tell me about all the duplicate extern variables that are in adc.h.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link Error&amp;nbsp;&amp;nbsp; : L1818: Symbol 14 - adclow duplicated in adc.c.o and main.c.o&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Link Error&amp;nbsp;&amp;nbsp; : L1818: Symbol 15 - adchigh duplicated in adc.c.o and main.c.o&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Link Error&amp;nbsp;&amp;nbsp; : L1818: Symbol 16 - adcRTD duplicated in adc.c.o and main.c.o&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Link Error&amp;nbsp;&amp;nbsp; : L1818: Symbol 17 - adcR duplicated in adc.c.o and main.c.o&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Link Error&amp;nbsp;&amp;nbsp; : L1818: Symbol 18 - RTD_Read_Times duplicated in adc.c.o and main.c.o&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Link Error&amp;nbsp;&amp;nbsp; : L1301: Cannot open file C:\my freescale projects\SetTime&amp;amp;Temp\Demo_Data\Standard\ObjectCode\adc.c.o&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Link Error&amp;nbsp;&amp;nbsp; : Link failed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I remove the #include adc.h from main, it will tell me it does not know what these variable are. Obviously the program I posted above has been lopped off so that I can show what I have here. I can assure you that in my main.c file, I do not have even 1 reference to adclow. I use the variable state as a switch for reading the ADC that is used in adc.c that I need to keep track of.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2010 03:10:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138662#M2212</guid>
      <dc:creator>Pyretta</dc:creator>
      <dc:date>2010-02-26T03:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138663#M2213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is how you want to handle the global variables of a module:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;//file: SomeModule.h ---------------------#ifndef SOME_MODULE_H#define SOME_MODULE_H//declare public global variablesextern int SomeModule_Var1;extern int SomeModule_Var2;//declare public functionsvoid SomeModule_Init(void);#endif//file: SomeModule.c ---------------------#include "SomeModule.h"//define public global variablesint SomeModule_Var1;int SomeModule_Var2;//define private global variablesstatic int PrivateVar1;//declare private functionsvoid privateFunction(void);//implementation of public and private functionsvoid SomeModule_Init(void){    SomeModule_Var1 = 0;    SomeModule_Var2 = 0;    PrivateVar1 = 0;}void privateFunction(void){    PrivateVar1++;}//file: main.c ---------------------#include "SomeModule.h"void main(void){    SomeModule_Init();    SomeModule_Var1 = 3;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public global variables are declared (use extern) in header file.&amp;nbsp; Public and private global variables are defined (do not use extern) in the c file.&amp;nbsp; Everyone who wants to use your public variables and functions includes the header file.&amp;nbsp; Remember that a #include statement merely replaces the statement with the text of the specified file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2010 05:59:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138663#M2213</guid>
      <dc:creator>isionous</dc:creator>
      <dc:date>2010-02-26T05:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138664#M2214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You get the linker error because you are trying to initialize extern variables. Initialization must be done where the variable is actually declared (allocated).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note the following:&lt;/P&gt;&lt;P&gt;- If you are using the ANSI option of Codewarrior, i.e. standard C, you don't need to initialize global variables to zero. All global variables are implicitly initialized to zero in the C language.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- It it considered bad programming to use global variables for many reasons. There are only two cases where you might need to declare global variables: When they are hardware registers, or when you have extreme demands on variable access time in performance-critical parts of a realtime system. In all other cases you shouldn't use extern/global variables, but instead use private encapsulation with set/get functions (that can be inlined).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- In embedded programming with systems that have non-volatile memory, you should avoid initialization of statics/globals entirely, because some non-standard compiler might remove initalization at startup to increase performance. Instead, set the variables in runtime before they are used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2010 18:04:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138664#M2214</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2010-02-26T18:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables and constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138665#M2215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A declaration cannot have a initial value. If a variable has one, it is always a definition, even if there is a extern keyword.&lt;/P&gt;&lt;P&gt;So;&lt;/P&gt;&lt;P&gt;&amp;gt;extern&amp;nbsp; unsigned long adclow=0;&lt;/P&gt;&lt;P&gt;is just the same as&lt;/P&gt;&lt;P&gt;&amp;gt;unsigned long adclow=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The header file should contain only:&lt;/P&gt;&lt;P&gt;// adc.h&lt;/P&gt;&lt;P&gt;&amp;gt;extern&amp;nbsp; unsigned long adclow;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And in adc.h, the variable should be defined:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// adc.c&lt;/P&gt;&lt;P&gt;&amp;gt;#include "adc.h"&lt;/P&gt;&lt;P&gt;&amp;gt;unsigned long adclow=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This means that the variable is listed at two places, once as declaration in the header with extern and with no initialization value, and once as definition in the c file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2010 23:39:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC08-Global-Variables-and-constants/m-p/138665#M2215</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2010-02-26T23:39:38Z</dc:date>
    </item>
  </channel>
</rss>

