Стандарт C++ 98, страница 3

PDF-файл Стандарт C++ 98, страница 3 Практикум (Прикладное программное обеспечение и системы программирования) (37588): Другое - 4 семестрСтандарт C++ 98: Практикум (Прикладное программное обеспечение и системы программирования) - PDF, страница 3 (37588) - СтудИзба2019-05-09СтудИзба

Описание файла

PDF-файл из архива "Стандарт C++ 98", который расположен в категории "". Всё это находится в предмете "практикум (прикладное программное обеспечение и системы программирования)" из 4 семестр, которые можно найти в файловом архиве МГУ им. Ломоносова. Не смотря на прямую связь этого архива с МГУ им. Ломоносова, его также можно найти и в других разделах. .

Просмотр PDF-файла онлайн

Текст 3 страницы из PDF

Implementations are required to diagnose programsthat use such extensions that are ill-formed according to this International Standard. Having done so, however, they can compile and execute such programs.__________________3) “Correct execution” can include undefined behavior, depending on the data being processed; see 1.3 and 1.9.3ISO/IEC 14882:1998(E)© ISO/IEC1.5 Structure of this International Standard1.5 Structure of this International Standard1 General[intro.structure]1Clauses 2 through 16 describe the C++ programming language. That description includes detailed syntacticspecifications in a form described in 1.6. For convenience, Annex A repeats all such syntactic specifications.2Clauses 17 through 27 (the library clauses) describe the Standard C++ library, which provides definitionsfor the following kinds of entities: macros (16.3), values (clause 3), types (8.1, 8.3), templates (clause 14),classes (clause 9), functions (8.3.5), and objects (clause 7).3Annex B recommends lower bounds on the capacity of conforming implementations.4Annex C summarizes the evolution of C++ since its first published description, and explains in detail thedifferences between C++ and C.

Certain features of C++ exist solely for compatibility purposes; Annex Ddescribes those features.5Finally, Annex E says what characters are valid in universal-character names in C++ identifiers (2.10).6Throughout this International Standard, each example is introduced by “[Example:” and terminated by “]”.Each note is introduced by “[Note:” and terminated by “]”. Examples and notes may be nested.1.6 Syntax notation1[syntax]In the syntax notation used in this International Standard, syntactic categories are indicated by italic type,and literal words and characters in constant width type.

Alternatives are listed on separate linesexcept in a few cases where a long set of alternatives is presented on one line, marked by the phrase “oneof.” An optional terminal or nonterminal symbol is indicated by the subscript “opt,” so{ expressionopt }indicates an optional expression enclosed in braces.2Names for syntactic categories have generally been chosen according to the following rules:— X-name is a use of an identifier in a context that determines its meaning (e.g. class-name, typedefname).— X-id is an identifier with no context-dependent meaning (e.g. qualified-id).— X-seq is one or more X’s without intervening delimiters (e.g. declaration-seq is a sequence of declarations).— X-list is one or more X’s separated by intervening commas (e.g.

expression-list is a sequence of expressions separated by commas).1.7 The C++ memory model[intro.memory]1The fundamental storage unit in the C++ memory model is the byte. A byte is at least large enough to contain any member of the basic execution character set and is composed of a contiguous sequence of bits, thenumber of which is implementation-defined. The least significant bit is called the low-order bit; the mostsignificant bit is called the high-order bit.

The memory available to a C++ program consists of one or moresequences of contiguous bytes. Every byte has a unique address.2[Note: the representation of types is described in 3.9. ]1.8 The C++ object model1[intro.object]The constructs in a C++ program create, destroy, refer to, access, and manipulate objects.

An object is aregion of storage. [Note: A function is not an object, regardless of whether or not it occupies storage in theway that objects do. ] An object is created by a definition (3.1), by a new-expression (5.3.4) or by theimplementation (12.2) when needed.

The properties of an object are determined when the object is created.An object can have a name (clause 3). An object has a storage duration (3.7) which influences its lifetime(3.8). An object has a type (3.9). The term object type refers to the type with which the object is created.4© ISO/IECISO/IEC 14882:1998(E)1 General1.8 The C++ object modelSome objects are polymorphic (10.3); the implementation generates information associated with each suchobject that makes it possible to determine that object’s type during program execution. For other objects,the interpretation of the values found therein is determined by the type of the expressions (clause 5) used toaccess them.2Objects can contain other objects, called sub-objects.

A sub-object can be a member sub-object (9.2), abase class sub-object (clause 10), or an array element. An object that is not a sub-object of any other objectis called a complete object.3For every object x, there is some object called the complete object of x, determined as follows:— If x is a complete object, then x is the complete object of x.— Otherwise, the complete object of x is the complete object of the (unique) object that contains x.4If a complete object, a data member (9.2), or an array element is of class type, its type is considered themost derived class, to distinguish it from the class type of any base class subobject; an object of a mostderived class type is called a most derived object.5Unless it is a bit-field (9.6), a most derived object shall have a non-zero size and shall occupy one or morebytes of storage.

Base class sub-objects may have zero size. An object of POD4) type (3.9) shall occupycontiguous bytes of storage.6[Note: C++ provides a variety of built-in types and several ways of composing new types from existingtypes (3.9). ]1.9 Program execution[intro.execution]1The semantic descriptions in this International Standard define a parameterized nondeterministic abstractmachine. This International Standard places no requirement on the structure of conforming implementations. In particular, they need not copy or emulate the structure of the abstract machine. Rather, conforming implementations are required to emulate (only) the observable behavior of the abstract machine asexplained below.5)2Certain aspects and operations of the abstract machine are described in this International Standard asimplementation-defined (for example, sizeof(int)).

These constitute the parameters of the abstractmachine. Each implementation shall include documentation describing its characteristics and behavior inthese respects. Such documentation shall define the instance of the abstract machine that corresponds tothat implementation (referred to as the ‘‘corresponding instance’’ below).3Certain other aspects and operations of the abstract machine are described in this International Standard asunspecified (for example, order of evaluation of arguments to a function).

Where possible, this International Standard defines a set of allowable behaviors. These define the nondeterministic aspects of theabstract machine. An instance of the abstract machine can thus have more than one possible executionsequence for a given program and a given input.4Certain other operations are described in this International Standard as undefined (for example, the effect ofdereferencing the null pointer). [Note: this International Standard imposes no requirements on the behaviorof programs that contain undefined behavior. ]5A conforming implementation executing a well-formed program shall produce the same observable behavior as one of the possible execution sequences of the corresponding instance of the abstract machine withthe same program and the same input.

However, if any such execution sequence contains an undefinedoperation, this International Standard places no requirement on the implementation executing that program__________________4) The acronym POD stands for “plain old data.”5) This provision is sometimes called the “as-if” rule, because an implementation is free to disregard any requirement of this International Standard as long as the result is as if the requirement had been obeyed, as far as can be determined from the observable behaviorof the program.

For instance, an actual implementation need not evaluate part of an expression if it can deduce that its value is not usedand that no side effects affecting the observable behavior of the program are produced.5ISO/IEC 14882:1998(E)1.9 Program execution© ISO/IEC1 Generalwith that input (not even with regard to operations preceding the first undefined operation).6The observable behavior of the abstract machine is its sequence of reads and writes to volatile data andcalls to library I/O functions.6)7Accessing an object designated by a volatile lvalue (3.10), modifying an object, calling a library I/Ofunction, or calling a function that does any of those operations are all side effects, which are changes in thestate of the execution environment. Evaluation of an expression might produce side effects.

At certainspecified points in the execution sequence called sequence points, all side effects of previous evaluationsshall be complete and no side effects of subsequent evaluations shall have taken place.7)8Once the execution of a function begins, no expressions from the calling function are evaluated until execution of the called function has completed.8)9When the processing of the abstract machine is interrupted by receipt of a signal, the values of objects withtype other than volatile sig_atomic_t are unspecified, and the value of any object not ofvolatile sig_atomic_t that is modified by the handler becomes undefined.10An instance of each object with automatic storage duration (3.7.2) is associated with each entry into itsblock.

Свежие статьи
Популярно сейчас
Как Вы думаете, сколько людей до Вас делали точно такое же задание? 99% студентов выполняют точно такие же задания, как и их предшественники год назад. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
5288
Авторов
на СтудИзбе
417
Средний доход
с одного платного файла
Обучение Подробнее