Skip to main content
Visitor II
January 2, 2008
Question

Global variables ? How??

  • January 2, 2008
  • 3 replies
  • 850 views
Posted on January 02, 2008 at 05:18

Global variables ? How??

    This topic has been closed for replies.

    3 replies

    Visitor II
    January 1, 2008
    Posted on January 01, 2008 at 08:05

    you can define it as ''int fofo;'' in one file and as ''extern int fofo;'' in the other.

    There is more fancy way to do the same - via include file.

    If you would try Google for ''creating global variable in c'' you would be surprized with the results :)

    http://www.imada.sdu.dk/~svalle/courses/dm14-2005/mirror/c/

    amorenoAuthor
    Visitor II
    January 2, 2008
    Posted on January 02, 2008 at 05:18

    Thank you for your reply.

    Now it's working properly

    Regards.

    ALFA

    amorenoAuthor
    Visitor II
    December 31, 2008
    Posted on December 31, 2007 at 09:03

    Hello all,

    My question is easy for you, sure.

    How I can create a global variable ? (I use IAR Workbench)

    That's, a variable that I can see in main.c and in 71x_it.c (interrupt routines).

    How can I do it??

    Yes, I'm totally newbie.

    Thank a lot

    ALFA