Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!portal!nanometrics!stealth From: stealth@nanometrics.portal.UUCP (Steve Sabram) Newsgroups: comp.lang.c Subject: Just above and below main() Message-ID: <1243@nanometrics.UUCP> Date: 10 Apr 91 00:44:21 GMT Organization: Nanometrics -- bit busting on bare metal Lines: 41 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@nanometrics.portal.com |Sunnyvale, CA