From: Jeff Woods <Kazrak+kernel@cesmail.net>
To: "John T. Williams" <jtwilliams@vt.edu>
Cc: "Linux-C-Programming (E-mail)" <linux-c-programming@vger.kernel.org>
Subject: Re: Stupid Question.
Date: Wed, 12 May 2004 13:02:25 -0600 [thread overview]
Message-ID: <6.0.1.1.0.20040512125919.02e8cec0@no.incoming.mail> (raw)
In-Reply-To: <1084387986.15249.25.camel@scotus.fesnel.no-ip.org>
At 5/12/2004 02:53 PM -0400, John T. Williams wrote:
>What does declaring a function static do? ie
>What is the difference between
>
>static int blue() {
> return 0;
>}
>
>and
>
>int blue() {
> return 0;
>}
It makes the function visible only within the comilation unit it's in. See
also:
http://www.phim.unibe.ch/comp_doc/c_manual/C/SYNTAX/static.htm
As the website points out static functions and static variables seem like
very different meanings of the word "static". In both cases I think of it
as "global but private/hidden".
--
Jeff Woods <kazrak+kernel@cesmail.net>
next prev parent reply other threads:[~2004-05-12 19:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-12 18:53 Stupid Question John T. Williams
2004-05-12 19:02 ` Jeff Woods [this message]
2004-05-13 14:38 ` Jan-Benedict Glaw
2004-05-13 18:27 ` Glynn Clements
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6.0.1.1.0.20040512125919.02e8cec0@no.incoming.mail \
--to=kazrak+kernel@cesmail.net \
--cc=jtwilliams@vt.edu \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).