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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/10/08 18:41
Modified:
  01/10/08 18:48

Read: times


 
#149263 - Actually, I\'d do it more like this
Responding to: ???'s previous message
main.h
// Public symbols from main.c
// These are just declarations; the definitions are in main.c
extern unsigned char data Sec, Min, Hr, Day;


calc.h
// Public symbols from calc.c
// These are just declarations; the definitions are in calc.c
extern unsigned char code Zero [] = {0x03, 0x61, 0x11, 0x03};
extern unsigned int Value = 0;
extern unsigned char dat;


main.c
#include "main.h" // Declarations only
#include "calc.h" // Declarations only

// Now provide the definitions of the public symbols for main:
// It doesn't matter that the declarations have been included;
// in fact, including the declarations means that the compiler will spot any inconsistencies!
unsigned char data Sec, Min, Hr, Day; 



calc.c
#include "main.h" // Declarations only
#include "calc.h" // Declarations only

// Now provide the definitions of the public symbols for calc:
unsigned char code Zero [] = {0x03, 0x61, 0x11, 0x03};
unsigned int Value = 0;
unsigned char dat;


List of 33 messages in thread
TopicAuthorDate
Havin more than .c Macros            01/01/70 00:00      
   I am not surprised            01/01/70 00:00      
      Here!            01/01/70 00:00      
         Multiple Definitions            01/01/70 00:00      
         I guess that            01/01/70 00:00      
            amazing            01/01/70 00:00      
               Disdain            01/01/70 00:00      
                  tomatoes and tomahtos            01/01/70 00:00      
                     Help!            01/01/70 00:00      
                        not compiling at all.            01/01/70 00:00      
                           Andy, Here!            01/01/70 00:00      
                              You really need to nail this!            01/01/70 00:00      
                        To spell it out for you...            01/01/70 00:00      
                           More errors            01/01/70 00:00      
                              My mistake - can you spot it?            01/01/70 00:00      
                                 In five minutes            01/01/70 00:00      
                                 I tried            01/01/70 00:00      
                                    The problem is...            01/01/70 00:00      
                           well when Ansy show mine, I'll show his            01/01/70 00:00      
                              Actually, I\'d do it more like this            01/01/70 00:00      
                                 It worked!            01/01/70 00:00      
                                    Not the way to go            01/01/70 00:00      
                                       Right!            01/01/70 00:00      
                                          Wrong?            01/01/70 00:00      
                           Spelled it wrong            01/01/70 00:00      
                              Correct!            01/01/70 00:00      
                                 good, and good enough for me            01/01/70 00:00      
                                    Keil GUI equivalent for the commandlinephobic            01/01/70 00:00      
                        How are you disabling case sensitivity?            01/01/70 00:00      
                           Most likely            01/01/70 00:00      
            Definitions vs Declarations            01/01/70 00:00      
   You need to give more info!            01/01/70 00:00      
   The title of this thread            01/01/70 00:00      

Back to Subject List