Beginning C for Arduino by Jack Purdum

Beginning C for Arduino by Jack Purdum

Author:Jack Purdum
Language: eng
Format: epub
Publisher: Apress®
Published: 2012-12-07T16:00:00+00:00


Figure 7-1. Statement block scope for temp.

In Figure 7-1, the shaded area defines the statement block scope for variable temp and extends from the end of the statement that defines temp to the closing brace of the if statement block. Variable temp may be used anywhere within the shaded area because it is “in scope.” Anywhere outside that shaded area, however, variable temp doesn't even exist. Outside the shared area in Figure 7-1, variable temp is no longer in the symbol table...it is out of scope...it is invisible...it is dead. As such, trying to use temp several lines after it has gone out of scope must draw an error message from the compiler—which it did.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.