Re: Is "scope" different from "visibility" ?

From: Peter (phaywood_at_alphalink.com.au.NO.SPAM)
Date: 02/12/05


Date: Sat, 12 Feb 2005 00:04:17 GMT

Groovy hepcat Jack Klein was jivin' on Wed, 09 Feb 2005 23:07:43 -0600
in comp.lang.c.
Re: Is "scope" different from "visibility" ?'s a cool scene! Dig it!

>On 9 Feb 2005 20:04:04 -0800, "TTroy" <tinesan@gmail.com> wrote in
>comp.lang.c:
>
>Scope is independent of linkage. Definitions or declarations inside a
>block have scope that lasts to the end of that block, but block scope
>declarations have no linkage. A file scope definition with the static
>keyword also has no linkage.

  Uh..., internal linkage, I think, Jack.

-------------------------------------------------------------------
6.2.2 Linkages of identifiers
...
3 If the declaration of a file scope identifier for an object or a
function contains the storageclass specifier static, the identifier
has internal linkage.20)
-------------------------------------------------------------------

-- 
Dig the even newer still, yet more improved, sig!
http://alphalink.com.au/~phaywood/
"Ain't I'm a dog?" - Ronny Self, Ain't I'm a Dog, written by G. Sherry & W. Walker.
I know it's not "technically correct" English; but since when was rock & roll "technically correct"?


Relevant Pages

  • Re: Specifier extern
    ... extern int b; // my line 6 ... more of an exercise for myself to see if I have a good grasp of linkage ... The outer one, at file scope, ... The "extern" keyword is particularly squirrely, ...
    (comp.lang.c)
  • Re: Array definition guarantees
    ... linkage tells you where, ... identifier that is spelled sufficiently similarly. ... I think it is closer to say that scope tells you where the name ... The second glitch in this is the "extern" keyword. ...
    (comp.lang.c)
  • Re: Scope of specifier extern
    ... But none of them have scope; ... The keyword "extern" affects ... The "scope" concept answers the question "can I `see' that identifier ... The "linkage" concept ...
    (comp.lang.c)
  • Re: Array definition guarantees
    ... linkage tells you where, ... identifier that is spelled sufficiently similarly. ... I think it is closer to say that scope tells you where the name ... The second glitch in this is the "extern" keyword. ...
    (comp.lang.c)
  • Re: Array definition guarantees
    ... the scope rules still apply to objects with internal linkage. ... an identifier with internal linkage and file scope is in scope ...
    (comp.lang.c)