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

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

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

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

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

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

Such an object exists and retains its last-stored value during the execution of the block and while theblock is suspended (by a call of a function or receipt of a signal).11The least requirements on a conforming implementation are:— At sequence points, volatile objects are stable in the sense that previous evaluations are complete andsubsequent evaluations have not yet occurred.— At program termination, all data written into files shall be identical to one of the possible results thatexecution of the program according to the abstract semantics would have produced.— The input and output dynamics of interactive devices shall take place in such a fashion that promptingmessages actually appear prior to a program waiting for input. What constitutes an interactive device isimplementation-defined.[Note: more stringent correspondences between abstract and actual semantics may be defined by eachimplementation.

]12A full-expression is an expression that is not a subexpression of another expression. If a language constructis defined to produce an implicit call of a function, a use of the language construct is considered to be anexpression for the purposes of this definition.13[Note: certain contexts in C++ cause the evaluation of a full-expression that results from a syntactic construct other than expression (5.18). For example, in 8.5 one syntax for initializer is( expression-list )but the resulting construct is a function call upon a constructor function with expression-list as an argumentlist; such a function call is a full-expression. For example, in 8.5, another syntax for initializer is= initializer-clausebut again the resulting construct might be a function call upon a constructor function with one assignmentexpression as an argument; again, the function call is a full-expression.

]__________________6) An implementation can offer additional library I/O functions as an extension. Implementations that do so should treat calls to thosefunctions as ‘‘observable behavior’’ as well.7) Note that some aspects of sequencing in the abstract machine are unspecified; the preceding restriction upon side effects applies tothat particular execution sequence in which the actual code is generated.

Also note that when a call to a library I/O function returns,the side effect is considered complete, even though some external actions implied by the call (such as the I/O itself) may not have completed yet.8) In other words, function executions do not interleave with each other.6© ISO/IECISO/IEC 14882:1998(E)1 General1.9 Program execution14[Note: the evaluation of a full-expression can include the evaluation of subexpressions that are not lexicallypart of the full-expression. For example, subexpressions involved in evaluating default argument expressions (8.3.6) are considered to be created in the expression that calls the function, not the expression thatdefines the default argument. ]15[Note: operators can be regrouped according to the usual mathematical rules only where the operators reallyare associative or commutative.9) For example, in the following fragmentint a, b;/*...*/a = a + 32760 + b + 5;the expression statement behaves exactly the same asa = (((a + 32760) + b) + 5);due to the associativity and precedence of these operators.

Thus, the result of the sum (a + 32760) isnext added to b, and that result is then added to 5 which results in the value assigned to a. On a machine inwhich overflows produce an exception and in which the range of values representable by an int is[– 32768,+32767], the implementation cannot rewrite this expression asa = ((a + b) + 32765);since if the values for a and b were, respectively, – 32754 and – 15, the sum a + b would produce anexception while the original expression would not; nor can the expression be rewritten either asa = ((a + 32765) + b);ora = (a + (b + 32765));since the values for a and b might have been, respectively, 4 and – 8 or – 17 and 12. However on amachine in which overflows do not produce an exception and in which the results of overflows arereversible, the above expression statement can be rewritten by the implementation in any of the above waysbecause the same result will occur.

]16There is a sequence point at the completion of evaluation of each full-expression10).17When calling a function (whether or not the function is inline), there is a sequence point after the evaluationof all function arguments (if any) which takes place before execution of any expressions or statements inthe function body. There is also a sequence point after the copying of a returned value and before the execution of any expressions outside the function11). Several contexts in C++ cause evaluation of a functioncall, even though no corresponding function call syntax appears in the translation unit. [Example: evaluation of a new expression invokes one or more allocation and constructor functions; see 5.3.4. For anotherexample, invocation of a conversion function (12.3.2) can arise in contexts in which no function call syntaxappears.

] The sequence points at function-entry and function-exit (as described above) are features of thefunction calls as evaluated, whatever the syntax of the expression that calls the function might be.18In the evaluation of each of the expressionsaaaa&& b|| b? b : c, busing the built-in meaning of the operators in these expressions (5.14, 5.15, 5.16, 5.18), there is a sequence__________________9) Overloaded operators are never assumed to be associative or commutative.10) As specified in 12.2, after the "end-of-full-expression" sequence point, a sequence of zero or more invocations of destructor functions for temporary objects takes place, usually in reverse order of the construction of each temporary object.11) The sequence point at the function return is not explicitly specified in ISO C, and can be considered redundant with sequencepoints at full-expressions, but the extra clarity is important in C++.

In C++, there are more ways in which a called function can terminate its execution, such as the throw of an exception.7ISO/IEC 14882:1998(E)1.9 Program execution© ISO/IEC1 Generalpoint after the evaluation of the first expression12).1.10 Acknowledgments[intro.ack]1The C++ programming language as described in this International Standard is based on the language asdescribed in Chapter R (Reference Manual) of Stroustrup: The C++ Programming Language (second edition, Addison-Wesley Publishing Company, ISBN 0– 201– 53992– 6, copyright © 1991 AT&T). That, inturn, is based on the C programming language as described in Appendix A of Kernighan and Ritchie: The CProgramming Language (Prentice-Hall, 1978, ISBN 0– 13– 110163– 3, copyright © 1978 AT&T).2Portions of the library clauses of this International Standard are based on work by P.J.

Plauger, which waspublished as The Draft Standard C++ Library (Prentice-Hall, ISBN 0– 13– 117003– 1, copyright © 1995P.J. Plauger).3All rights in these originals are reserved.__________________12) The operators indicated in this paragraph are the built-in operators, as described in clause 5. When one of these operators is overloaded (clause 13) in a valid context, thus designating a user-defined operator function, the expression designates a function invocation,and the operands form an argument list, without an implied sequence point between them.8© ISO/IECISO/IEC 14882:1998(E)2 Lexical conventions[lex]1The text of the program is kept in units called source files in this International Standard.

A source filetogether with all the headers (17.4.1.2) and source files included (16.2) via the preprocessing directive#include, less any source lines skipped by any of the conditional inclusion (16.1) preprocessing directives, is called a translation unit. [Note: a C++ program need not all be translated at the same time.

]2[Note: previously translated translation units and instantiation units can be preserved individually or inlibraries. The separate translation units of a program communicate (3.5) by (for example) calls to functionswhose identifiers have external linkage, manipulation of objects whose identifiers have external linkage, ormanipulation of data files. Translation units can be separately translated and then later linked to produce anexecutable program.

(3.5). ]2.1 Phases of translation1[lex.phases]13)The precedence among the syntax rules of translation is specified by the following phases.1 Physical source file characters are mapped, in an implementation-defined manner, to the basic sourcecharacter set (introducing new-line characters for end-of-line indicators) if necessary. Trigraphsequences (2.3) are replaced by corresponding single-character internal representations.

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