cancel
Showing results for 
Search instead for 
Did you mean: 

Global variables ? How??

amoreno
Associate II
Posted on January 02, 2008 at 05:18

Global variables ? How??

3 REPLIES 3
rasty
Associate II
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
Associate II
Posted on January 02, 2008 at 05:18

Thank you for your reply.

Now it's working properly

Regards.

ALFA

amoreno
Associate II
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