>'static' encapsulates variables to file scope. 'auto'
>encapsulates
>variables to block scope...
 
To be more precise,
 
The scope of a variable is
1. The area of the program where that variable is valid.
2. The life span of that variable.
 
static used as global varable encapsulates variables to file scope.
static declared locally encapsulates variables to block/function scope, 
Though this local static will be alive for lifetime (of the binary) it cannot 
be accessed outside
the block/function, so I guess scope is limited to block/function.
 
Plz. correct me if I'm wrong.
 
Regards,
Bala



--- On Tue, 7/22/08, Paul Herring <[EMAIL PROTECTED]> wrote:

From: Paul Herring <[EMAIL PROTECTED]>
Subject: Re: [c-prog] Re: What are Access Modifiers in C ???
To: [email protected]
Date: Tuesday, July 22, 2008, 6:46 AM

On Tue, Jul 22, 2008 at 2:31 PM, bart_pengyou <[EMAIL PROTECTED]>
wrote:

> I'm quite sure C language has no 'access modifiers' or
'access
> specifiers' because the C language is not an Object-oriented
> language. 'Access modifiers' and 'access specifiers' are
language
> implementations of the concept of encapsulation, which is a major
> feature in Object-oriented languages --- but not in C.
> I suppose you are pertaining to C++, not C.

'static' encapsulates variables to file scope. 'auto'
encapsulates
variables to block scope...

-- 
PJH

'Two Dead in Baghdad' not 'product-friendly' - Kent Ertugrul,
chief
executive of Phorm.

http://shabbleland.myminicity.com

------------------------------------

To unsubscribe, send a blank message to
<mailto:[EMAIL PROTECTED]>.Yahoo! Groups Links




      

[Non-text portions of this message have been removed]

Reply via email to