Re: Is "scope" different from "visibility" ?
From: Ben Pfaff (blp_at_cs.stanford.edu)
Date: 02/10/05
- Next message: jacob navia: "Re: Reading whole text files"
- Previous message: Chris Croughton: "Re: getting cpp to insert a newline"
- In reply to: Jack Klein: "Re: Is "scope" different from "visibility" ?"
- Next in thread: Peter : "Re: Is "scope" different from "visibility" ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 10 Feb 2005 10:03:41 -0800
Jack Klein <jackklein@spamcop.net> writes:
> On 9 Feb 2005 20:04:04 -0800, "TTroy" <tinesan@gmail.com> wrote in
> comp.lang.c:
>
>> I have a few questions about "scope" and "visibility," which seem like
>> two different things.
>
> Scope is something defined by the C standard. "visibility" is not.
The standard does not specifically define "visibility" but it
does use the term "visible" a fair amount, e.g.:
For each different entity that an identifier designates,
the identifier is visible (i.e., can be used) only within a
region of program text called its scope.
...
Within the inner scope, the identifier designates the entity
declared in the inner scope; the entity declared in the
outer scope is hidden (and not visible) within the inner
scope.
Unless explicitly stated otherwise, where this International
Standard uses the term ``identifier'' to refer to some
entity (as opposed to the syntactic construct), it refers to
the entity in the relevant name space whose declaration is
visible at the point the identifier occurs.
...
If more than one declaration of a particular identifier is
visible at any point in a translation unit, the syntactic
context disambiguates uses that refer to different entities.
-- "I should killfile you where you stand, worthless human." --Kaz
- Next message: jacob navia: "Re: Reading whole text files"
- Previous message: Chris Croughton: "Re: getting cpp to insert a newline"
- In reply to: Jack Klein: "Re: Is "scope" different from "visibility" ?"
- Next in thread: Peter : "Re: Is "scope" different from "visibility" ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|