View Single Post
  #4   Spotlight this post!  
Unread 18-01-2004, 00:31
SeanCassidy's Avatar
SeanCassidy SeanCassidy is offline
Antiregistered User
#0263 (Aftershock)
Team Role: Programmer
 
Join Date: Oct 2003
Location: Holtsville, NY
Posts: 37
SeanCassidy is an unknown quantity at this point
Re: Using the extern keyword.

Hmm, when the variable is changed in user_routines.c, do you have to extern it back in u_r_f.c? Like so:

Code:
/*user_routines_fast.c*/
int foo = 263;
extern user_routines_function();    /*Is this extern needed?*/
extern foo = foo - 1;               /*Do we need the extern now,
                                     *because it was modified in u_r.c?*/

/*user_routines.c*/
user_routines_function()
{
  extern foo = foo + 3;
}