1 <!DOCTYPE HTML PUBLIC
"-//W3O//DTD W3 HTML 2.0//EN">
2 <!-- This collection of hypertext pages is Copyright 1995, 1996 by Steve Summit. -->
3 <!-- This material may be freely redistributed and used -->
4 <!-- but may not be republished or sold without permission. -->
7 <link rev=
"owner" href=
"mailto:scs@eskimo.com">
8 <link rev=
"made" href=
"mailto:scs@eskimo.com">
9 <title>section
4.8: Block Structure
</title>
10 <link href=
"sx7g.html" rev=precedes
>
11 <link href=
"sx7i.html" rel=precedes
>
12 <link href=
"sx7.html" rev=subdocument
>
15 <H2>section
4.8: Block Structure
</H2>
18 <p>You've probably heard that global variables are ``bad''
19 because they exist everywhere
20 and it can be hard to keep track of who's using them.
22 it can be useful to limit the scope of a local variable
23 to just the bit of the function that uses it,
24 which is exactly what happens
25 if we declare a variable in an inner block.
29 <a href=
"sx7g.html" rev=precedes
>prev
</a>
30 <a href=
"sx7i.html" rel=precedes
>next
</a>
31 <a href=
"sx7.html" rev=subdocument
>up
</a>
32 <a href=
"top.html">top
</a>
35 This page by
<a href=
"http://www.eskimo.com/~scs/">Steve Summit
</a>
36 //
<a href=
"copyright.html">Copyright
</a> 1995,
1996
37 //
<a href=
"mailto:scs@eskimo.com">mail feedback
</a>