Re: visibility of variable
- From: Eric Sosman <eric.sosman@xxxxxxx>
- Date: Mon, 26 Sep 2005 15:54:18 -0400
Emmanuel Delahaye wrote On 09/26/05 15:33,:
> Michael Mair wrote on 26/09/05 :
>
>>Emmanuel Delahaye wrote:
>>
>>>rahul8143@xxxxxxxxx wrote on 26/09/05 :
>>>
>>>
>>>> To limit scope of a variable in a single file that is part of a
>>>>large project that have several C files we use static variable
>>>>right?then to limit any variable to function scope it should be
>>>>declared as auto or anything else?
>>>
>>>There is no 'function scope'.
>>
>>There _is_ function scope.
>>Function scope is what labels are visible in.
>>
>>
>>>There is 'block scope'. A variable defined in a block has the block scope.
>>>If it has the 'static' qualifier, it becomes persistent.
>>
>>Right.
>>
>>Cheers
>> Michael
>
>
> labels ? goto ? Sorry, I don't code in assembly nor in BASIC anymore
> ;-)
Do you write functions with non-empty argument lists?
--
Eric.Sosman@xxxxxxx
.
- Follow-Ups:
- Re: visibility of variable
- From: Emmanuel Delahaye
- Re: visibility of variable
- References:
- visibility of variable
- From: rahul8143
- Re: visibility of variable
- From: Emmanuel Delahaye
- Re: visibility of variable
- From: Michael Mair
- Re: visibility of variable
- From: Emmanuel Delahaye
- visibility of variable
- Prev by Date: Re: I don't quite understand this exercise...
- Next by Date: Re: Count Words
- Previous by thread: Re: visibility of variable
- Next by thread: Re: visibility of variable
- Index(es):
Relevant Pages
|