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

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

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

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

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

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

The set of alternative tokens is defined in Table 2.Table 2—alternative tokens_______________________________________________________________________________________________________________________________alternative primary  alternative primary  alternative primary ______________________________________________________________<%{and&&&=_______________________________________________________________ and_eq%>} bitor| or_eq|=_______________________________________________________________ xor_eq<:[or||^=_______________________________________________________________:>]xor^not!______________________________________________________________________________________________________________________________ compl not_eq%:#~!=%:%:##&_______________________________________________________________ bitand2.6 Tokens[lex.token]token:identifierkeywordliteraloperatorpunctuator1There are five kinds of tokens: identifiers, keywords, literals,18) operators, and other separators.

Blanks,horizontal and vertical tabs, newlines, formfeeds, and comments (collectively, “white space”), as describedbelow, are ignored except as they serve to separate tokens. [Note: Some white space is required to separateotherwise adjacent identifiers, keywords, numeric literals, and alternative tokens containing alphabeticcharacters. ]2.7 Comments1[lex.comment]The characters /* start a comment, which terminates with the characters */. These comments do not nest.The characters // start a comment, which terminates with the next new-line character. If there is a formfeed or a vertical-tab character in such a comment, only white-space characters shall appear between it andthe new-line that terminates the comment; no diagnostic is required.

[Note: The comment characters //,/*, and */ have no special meaning within a // comment and are treated just like other characters. Similarly, the comment characters // and /* have no special meaning within a /* comment. ]__________________16) These include “digraphs” and additional reserved words. The term “digraph” (token consisting of two characters) is not perfectlydescriptive, since one of the alternative preprocessing-tokens is %:%: and of course several primary tokens contain two characters.Nonetheless, those alternative tokens that aren’t lexical keywords are colloquially known as “digraphs”.17) Thus the “stringized” values (16.3.2) of [ and <: will be different, maintaining the source spelling, but the tokens can otherwise befreely interchanged.18) Literals include strings and character and numeric literals.12© ISO/IECISO/IEC 14882:1998(E)2 Lexical conventions2.8 Header names2.8 Header names[lex.header]header-name:<h-char-sequence>"q-char-sequence"h-char-sequence:h-charh-char-sequence h-charh-char:any member of the source character set exceptnew-line and >q-char-sequence:q-charq-char-sequence q-charq-char:any member of the source character set exceptnew-line and "1Header name preprocessing tokens shall only appear within a #include preprocessing directive (16.2).The sequences in both forms of header-names are mapped in an implementation-defined manner to headersor to external source file names as specified in 16.2.2If either of the characters ’ or \, or either of the character sequences /* or // appears in a q-charsequence or a h-char-sequence, or the character " appears in a h-char-sequence, the behavior is undefined.19)2.9 Preprocessing numbers[lex.ppnumber]pp-number:digit.

digitpp-number digitpp-number nondigitpp-number e signpp-number E signpp-number .1Preprocessing number tokens lexically include all integral literal tokens (2.13.1) and all floating literaltokens (2.13.3).2A preprocessing number does not have a type or a value; it acquires both after a successful conversion (aspart of translation phase 7, 2.1) to an integral literal token or a floating literal token.2.10 Identifiers[lex.name]identifier:nondigitidentifier nondigitidentifier digit__________________19) Thus, sequences of characters that resemble escape sequences cause undefined behavior.13ISO/IEC 14882:1998(E)© ISO/IEC2.10 Identifiers2 Lexical conventionsnondigit: one ofuniversal-character-name_ a b c d e f g hn o p q r s t uA B C D E F G HN O P Q R S T UivIVjwJWkxKXlyLYmzMZdigit: one of0 1 2 3 4 5 6 7 8 91An identifier is an arbitrarily long sequence of letters and digits.

Each universal-character-name in an identifier shall designate a character whose encoding in ISO 10646 falls into one of the ranges specified inAnnex E. Upper- and lower-case letters are different. All characters are significant.20)2In addition, some identifiers are reserved for use by C++ implementations and standard libraries (17.4.3.1.2)and shall not be used otherwise; no diagnostic is required.2.11 Keywords1[lex.key]The identifiers shown in Table 3 are reserved for use as keywords (that is, they are unconditionally treatedas keywords in phase 7):Table 3—keywords___________________________________________________________________________________ asmdoifreturntypedef  autodoubleinlineshorttypeiddynamic_castintsignedtypename  boolelselongsizeofunion break caseenummutablestaticunsigned  catchexplicitnamespacestatic_castusing charexportnewstructvirtual externoperatorswitchvoid classfalseprivatetemplatevolatile  const const_castfloatprotectedthiswchar_t  continueforpublicthrowwhile defaultfriendregistertruedeletegotoreinterpret_casttry___________________________________________________________________________________2Furthermore, the alternative representations shown in Table 4 for certain operators and punctuators (2.5) arereserved and shall not be used otherwise:Table 4—alternative representations________________________________________________________ andand_eqbitandbitorcomplnot  not_eqoror_eqxorxor_eq__________________________________________________________________________20) On systems in which linkers cannot accept extended characters, an encoding of the universal-character-name may be used in forming valid external identifiers.

For example, some otherwise unused character or sequence of characters may be used to encode the \uin a universal-character-name. Extended characters may produce a long external identifier, but C++ does not place a translation limiton significant characters for external identifiers. In C++, upper- and lower-case letters are considered different for all identifiers,including external identifiers.14© ISO/IECISO/IEC 14882:1998(E)2 Lexical conventions2.12 Operators and punctuators2.12 Operators and punctuators1[lex.operators]The lexical representation of C++ programs includes a number of preprocessing tokens which are used inthe syntax of the preprocessor or are converted into tokens for operators and punctuators:preprocessing-op-or-punc: one of{}[<::><%newdelete ?+*!=<^=&=|=<=>=&&andand_eq bitandoror_eqxor]%>::/><<||bitorxor_eq#%:.%+=>>++compl##%:%:.*^-=>>=-not(;):...&*=<<=,not_eq|/===->*~%=!=->Each preprocessing-op-or-punc is converted to a single token in translation phase 7 (2.1).2.13 Literals1[lex.literal]There are several kinds of literals.21)literal:integer-literalcharacter-literalfloating-literalstring-literalboolean-literal2.13.1 Integer literals[lex.icon]integer-literal:decimal-literal integer-suffixoptoctal-literal integer-suffixopthexadecimal-literal integer-suffixoptdecimal-literal:nonzero-digitdecimal-literal digitoctal-literal:0octal-literal octal-digithexadecimal-literal:0x hexadecimal-digit0X hexadecimal-digithexadecimal-literal hexadecimal-digitnonzero-digit: one of1 2 345678octal-digit: one of0 1 2345679__________________21) The term “literal” generally designates, in this International Standard, those tokens that are called “constants” in ISO C.15ISO/IEC 14882:1998(E)© ISO/IEC2.13.1 Integer literalshexadecimal-digit:0 1a bA B2 Lexical conventionsone of2 3c dC D4eE5fF6789integer-suffix:unsigned-suffix long-suffixoptlong-suffix unsigned-suffixoptunsigned-suffix: one ofu Ulong-suffix: one ofl L1An integer literal is a sequence of digits that has no period or exponent part.

An integer literal may have aprefix that specifies its base and a suffix that specifies its type. The lexically first digit of the sequence ofdigits is the most significant. A decimal integer literal (base ten) begins with a digit other than 0 and consists of a sequence of decimal digits. An octal integer literal (base eight) begins with the digit 0 and consists of a sequence of octal digits.22) A hexadecimal integer literal (base sixteen) begins with 0x or 0X andconsists of a sequence of hexadecimal digits, which include the decimal digits and the letters a through fand A through F with decimal values ten through fifteen.

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