Re: visibility of variable





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

.



Relevant Pages

  • Global labels in inline assembly.
    ... ends up getting posted twice. ... Using Visual Studio 2005 and inline assembly, I need to get access to the ... just use normal labels but those labels have function scope. ...
    (alt.lang.asm)
  • Re: Jumping into block of an if construct
    ... > C does does scoping at a block level. ... Labels have function scope, not block scope. ... Prev by Date: ...
    (comp.lang.fortran)
  • Re: visibility of variable
    ... Emmanuel Delahaye wrote: ... Function scope is what labels are visible in. ... in a block has the block scope. ... If it has the 'static' qualifier, ...
    (comp.lang.c)