>Message: 1
 >Date: Fri, 28 Jul 2006 10:51:10 +0200
 >From: Ernst Bachmann <[EMAIL PROTECTED]>
 >Subject: Re: [Sdcc-user] RESOLVED! "polling volatile variable from
        "extern"        main() failed"
 >To: [email protected]
 >Message-ID: <[EMAIL PROTECTED]>
 >Content-Type: text/plain;  charset="utf-8"

 >Hi,
 >On Wednesday 26 July 2006 06:00, [EMAIL PROTECTED] wrote:
 >> Dear listers,
 >>
 >> I thank you all for your responses.
 >>
 >> I have resolved my original problem. Now I am happily compiling using
 >> modular feature and make the best of it.
 >
 >[...]
 >
 >>     SYS.H
 >>     =====
 >>     #ifndef SYS_H
 >>     #define SYS_H
 >>      #ifdef SYS_C
 >>       volatile unsigned int  vTICKS ...
 >...snip...
 >>       extern volatile unsigned char vTIMEOUT;         // system timeout
 >> flag #endif /* SYS_C */
 >>     #endif /* SYS_H */
 >
 >Just out of curiosity: Why don't you do that the "usual" way?
 >
 >SYS.H:
 > #ifndef SYS_H
 > #define SYS_H
 >    extern void somefunction(void);
 >    extern volatile unsigned int  vTICKS;
 > #endif
 >
 >SYS.C:
 >  #include "sys.h"
 >  void somefunction(void) {
 >  }
 >  volatile unsigned int  vTICKS;
 >
 >...?
 >
 >You can have as many "extern" forward declarations for a single
 >variable/function as you want in a compilation unit, as long as there's only
 >one actual "implementation" for it, that is one decl without "extern".
 >
 >Greetings,
 >/Ernst

Hi.
Thanks /Ernst.

I could do that for may next codes.

Regards,
Fahmy



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to