summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLevi Bostian <levi.bostian@gmail.com>2013-11-24 14:25:30 -0600
committerLevi Bostian <levi.bostian@gmail.com>2013-11-24 14:25:30 -0600
commitaf9cc6e9b9748e43cb1c02013fe92465c3455503 (patch)
tree694daff26dd6594c6efc2eeaf4d478d0225b0d88
parente63232d2de1e2058dd381fe1094c7f775f2e3eb8 (diff)
Edit static description wording. Add note about private functions.
-rw-r--r--c.html.markdown6
1 files changed, 3 insertions, 3 deletions
diff --git a/c.html.markdown b/c.html.markdown
index 7b95c969..ab09a4a2 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -469,12 +469,12 @@ void testFunc() {
extern int i; //i here is now using external variable i
}
-//if external variable should only be visible to functions in the source file
-// they are declared in, use static:
-static int i = 0; //other source files using testFunc() cannot access variable i
+//make external variables private to source file with static:
+static int i = 0; //other files using testFunc() cannot access variable i
void testFunc() {
extern int i;
}
+//**You may also declare functions as static to make them private**
/*
char c[] = "This is a test.";