Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: storage class static of functions

Reply
Thread Tools

Re: storage class static of functions

 
 
Willem
Guest
Posts: n/a
 
      01-15-2008
asit wrote:
) Can functions have static storage clas ?? If yes, what is it's
) advantage ??

No, functions can not have static storage class.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
 
Reply With Quote
 
 
 
 
Walter Roberson
Guest
Posts: n/a
 
      01-15-2008
In article <(E-Mail Removed)>,
Willem <(E-Mail Removed)> wrote:
>asit wrote:
>) Can functions have static storage clas ?? If yes, what is it's
>) advantage ??


>No, functions can not have static storage class.


C89 3.7.1 Function Definitions
[...]
The storage-class specifier, if any, in the declaration specifiers
shall be either extern or static.

The same wording appears in N869 6.9.1 Function definitions
--
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth
 
Reply With Quote
 
 
 
 
Chris Dollin
Guest
Posts: n/a
 
      01-15-2008
Willem wrote:

> asit wrote:
> ) Can functions have static storage clas ?? If yes, what is it's
> ) advantage ??
>
> No, functions can not have static storage class.


That's an interesting claim; to be clear, are you saying that

static void nuffin(void) {}

isn't legal, or are you saying that the notion of "storage class"
appropriate to variables isn't applicable to functions?

--
Left Or Right? Hedgehog
A rock is not a fact. A rock is a rock.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
storage class static of functions asit C Programming 2 01-16-2008 05:03 AM
Re: storage class static of functions jacob navia C Programming 2 01-15-2008 09:36 PM
Difference b/w storage class and storage class specifier sarathy C Programming 2 07-17-2006 05:06 PM
Instantiating a static class( Class with all static members - methods and variables) SaravanaKumar Java 6 10-19-2004 08:20 AM
a static local variable in a static method is thread local storage? Patrick Hoffmann C++ 3 08-08-2003 02:37 PM



Advertisments