Just above and below main()

Steve Sabram stealth at nanometrics.portal.UUCP
Wed Apr 10 10:44:21 AEST 1991


Ok, we got a big debate here at work about
the folowing piece of code;
_________________________

int outside;

main()
{
int inside;
...
}

_________________________

Just what are the differences
between these two variables?
 
We all agree that "outside" is
a global and thus accessable
to all functions in this file
while "inside" is accessable 
only to everything in main().

Our debate is which one of these 
two are initialized to zero if
any.  This is important
to us since we are coding for
a microcontroller and ROMing
the code.  We are detecting 
cold or warm resets with the 
varable "outside".  We just 
want to make sure if this is just
to this complier or a part of ANSI.




-- 
   ________   ______     
  (___  ___) (___    Stephen R. Sabram -- engineering dude |Nanometrics, Inc
______) \________)       stealth at nanometrics.portal.com    |Sunnyvale, CA 



More information about the Comp.lang.c mailing list