Skip to main content
amoreno
Associate III
Jan 2, 2008 4:18 AM UTC
Question

Global variables ? How??

Posted on January 02, 2008 at 05:18

Global variables ? How??

This topic has been closed for replies.

3 replies

rasty
Associate
Jan 1, 2008 7:05 AM UTC
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/

amoreno
amorenoAuthor
Associate III
Jan 2, 2008 4:18 AM UTC
Posted on January 02, 2008 at 05:18

Thank you for your reply.

Now it's working properly

Regards.

ALFA

amoreno
amorenoAuthor
Associate III
Dec 31, 2008 8:03 AM UTC
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