3-[Basic]-"basic"

Source: Internet
Author: User
Tags goto
Please do not reprint this article, please do not publish this article in any form, please delete it within 24 hours of downloading this article, prohibit the use of this article for commercial purposes.
3 Basic Concepts [basic]  3 Basic Concepts "basic" 
[Note:this clause presents the basic concepts of the C + + language. It explains the difference between an object with a name and how they relate to the notion of a lvalue. It introduces the concepts of a declaration and a definition and presents C + + ' notion of type, scope, linkage, and Storag E duration. The mechanisms for starting and terminating a program are discussed. Finally, this clause presents the fundamental types of the language and lists the ways of constructing compound These.

 

"NOTE: This chapter describes the basic concepts of the C + + language. This chapter explains the difference between objects and names and how they relate to the concept of a left value. This chapter presents the concepts of declarations and definitions, and describes the types, scopes, connectivity, and storage types of C + +. Discuss the mechanism of program initiation and termination. Finally, this chapter describes the basic types of the language and lists the methods by which they are constructed.

 

This clause does isn't cover concepts that affect only a single part of the language. Such concepts are discussed in the relevant clauses. ]

 

This chapter does not cover concepts that are useful only for a subset of the languages. These concepts will be discussed in the relevant chapters. 】

 

An entity is a value, object, Subobject, base class Subobject, array element, variable, function, instance of a function, Enumerator, type, class member, template, or namespace.

 

An entity is a value, an object, a child object, a base class child object, an array element, a variable, a function, an instance of a function, an enumerator, a type, a class member, a template, or a name space.

 

A name is a use of the identifier (2.10) that denotes a entity or label (6.6.4, 6.1). A variable is introduced by the Declaration of object. The variable ' s name denotes the object.

 

A name is the use of an identifier (2.10) that indicates an entity or label (6.6.4,6.1). A variable is introduced by the declaration of an object. The name of the variable indicates the object.

 

Every name that denotes the entity is introduced by a declaration. Every name that denotes a label is introduced either by a goto statement (6.6.4) or a labeled-statement (6.1).

 

The declaration introduces each name that indicates an entity. The name of each indicator tag is introduced by a goto statement (6.6.4) or a label statement (6.1).

 

Some names denote types, classes, enumerations, or templates. In general, it are necessary to determine whether or not a name denotes one of these entities before parsing the "program th" At contains it. The process so determines this is called name lookup (3.4).

 

Some names indicate types, classes, enumerations, or templates. Before parsing a program, it is often necessary to determine whether a name indicates these entities. The process of determining this information is called name lookup (3.4).

 

Two names are the same if they are identifiers composed of the same character; Or they are the names of overloaded operator functions with the formed same; Or they are the names of user-defined conversion functions formed with the same type.

 

The two names are the same: they are identifiers that consist of the same sequence of characters, or they are the names of operator overloaded functions that form the same operator, or they are user-defined conversion functions that form the same type.

 

An identifier used at more than one translation unit can potentially refer to the same entity into these translation units D Epending on the linkage (3.5) of the identifier specified and translation unit.

 

Names used in more than one translation unit may refer to the same entities in these translation units, depending on the connectivity of the identifier specified in each translation unit (3.5).

 

3.1 Declarations and definitions [basic.def]  3.1 Declaration and definition "basic. Definition" 
3.2 One definition rule [BASIC.DEF.ODR]  3.2 Single definition principle "basic. Definition. ODR" 
3.3 Declarative regions and scopes [Basic.scope]  3.3 Declaring the area and scope "basic. Scope" 
3.4 Name Lookup [Basic.lookup]  3.4 Name Search "Basic. Find" 
3.5 program and linkage [Basic.link]  3.5 Program and Connectivity "Basic. Connection" 
3.6 Start and termination [Basic.start]  3.6 Startup and termination "Basic." 
3.7 Storage Duration [BASIC.STC]  3.7 Storage Type "Basic. Storage Type" 
3.8 Object Lifetime [Basic.life]  3.8 Object Lifetime "basic. Lifetime" 
3.9 Types [basic.types]  3.9 Type "basic. Type" 
3.10 lvalues and Rvalues [Basic.lval]  3.10 Left value and right value "basic. Left value" 
PREV [Lex.bool] | NEXT [Basic.def] Previous Page "lexical. Boolean" | Next page "Basic. Definition"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.