Главная » Просмотр файлов » Стандарт языка Си С99 TC

Стандарт языка Си С99 TC (1113411), страница 53

Файл №1113411 Стандарт языка Си С99 TC (Стандарт языка Си С99 + TC) 53 страницаСтандарт языка Си С99 TC (1113411) страница 532019-04-24СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 53)

If there are insufficient arguments for the format,the behavior is undefined. If the format is exhausted while arguments remain, the excessarguments are evaluated (as always) but are otherwise ignored.3The format shall be a multibyte character sequence, beginning and ending in its initialshift state. The format is composed of zero or more directives: one or more white-spacecharacters, an ordinary multibyte character (neither % nor a white-space character), or aconversion specification. Each conversion specification is introduced by the character %.After the %, the following appear in sequence:— An optional assignment-suppressing character *.— An optional decimal integer greater than zero that specifies the maximum field width(in characters).282Library§7.19.6.2WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3— An optional length modifier that specifies the size of the receiving object.— A conversion specifier character that specifies the type of conversion to be applied.4The fscanf function executes each directive of the format in turn.

If a directive fails, asdetailed below, the function returns. Failures are described as input failures (due to theoccurrence of an encoding error or the unavailability of input characters), or matchingfailures (due to inappropriate input).5A directive composed of white-space character(s) is executed by reading input up to thefirst non-white-space character (which remains unread), or until no more characters canbe read.6A directive that is an ordinary multibyte character is executed by reading the nextcharacters of the stream. If any of those characters differ from the ones composing thedirective, the directive fails and the differing and subsequent characters remain unread.Similarly, if end-of-file, an encoding error, or a read error prevents a character from beingread, the directive fails.7A directive that is a conversion specification defines a set of matching input sequences, asdescribed below for each specifier.

A conversion specification is executed in thefollowing steps:8Input white-space characters (as specified by the isspace function) are skipped, unlessthe specification includes a [, c, or n specifier.250)9An input item is read from the stream, unless the specification includes an n specifier. Aninput item is defined as the longest sequence of input characters which does not exceedany specified field width and which is, or is a prefix of, a matching input sequence.251)The first character, if any, after the input item remains unread.

If the length of the inputitem is zero, the execution of the directive fails; this condition is a matching failure unlessend-of-file, an encoding error, or a read error prevented input from the stream, in whichcase it is an input failure.10Except in the case of a % specifier, the input item (or, in the case of a %n directive, thecount of input characters) is converted to a type appropriate to the conversion specifier. Ifthe input item is not a matching sequence, the execution of the directive fails: thiscondition is a matching failure.

Unless assignment suppression was indicated by a *, theresult of the conversion is placed in the object pointed to by the first argument followingthe format argument that has not already received a conversion result. If this objectdoes not have an appropriate type, or if the result of the conversion cannot be represented250) These white-space characters are not counted against a specified field width.251) fscanf pushes back at most one input character onto the input stream.

Therefore, some sequencesthat are acceptable to strtod, strtol, etc., are unacceptable to fscanf.§7.19.6.2Library283ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256in the object, the behavior is undefined.11The length modifiers and their meanings are:hhSpecifies that a following d, i, o, u, x, X, or n conversion specifier appliesto an argument with type pointer to signed char or unsigned char.hSpecifies that a following d, i, o, u, x, X, or n conversion specifier appliesto an argument with type pointer to short int or unsigned shortint.l (ell)Specifies that a following d, i, o, u, x, X, or n conversion specifier appliesto an argument with type pointer to long int or unsigned longint; that a following a, A, e, E, f, F, g, or G conversion specifier applies toan argument with type pointer to double; or that a following c, s, or [conversion specifier applies to an argument with type pointer to wchar_t.ll (ell-ell) Specifies that a following d, i, o, u, x, X, or n conversion specifier appliesto an argument with type pointer to long long int or unsignedlong long int.jSpecifies that a following d, i, o, u, x, X, or n conversion specifier appliesto an argument with type pointer to intmax_t or uintmax_t.zSpecifies that a following d, i, o, u, x, X, or n conversion specifier appliesto an argument with type pointer to size_t or the corresponding signedinteger type.tSpecifies that a following d, i, o, u, x, X, or n conversion specifier appliesto an argument with type pointer to ptrdiff_t or the correspondingunsigned integer type.LSpecifies that a following a, A, e, E, f, F, g, or G conversion specifierapplies to an argument with type pointer to long double.If a length modifier appears with any conversion specifier other than as specified above,the behavior is undefined.12The conversion specifiers and their meanings are:dMatches an optionally signed decimal integer, whose format is the same asexpected for the subject sequence of the strtol function with the value 10for the base argument.

The corresponding argument shall be a pointer tosigned integer.iMatches an optionally signed integer, whose format is the same as expectedfor the subject sequence of the strtol function with the value 0 for thebase argument. The corresponding argument shall be a pointer to signedinteger.284Library§7.19.6.2WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3oMatches an optionally signed octal integer, whose format is the same asexpected for the subject sequence of the strtoul function with the value 8for the base argument. The corresponding argument shall be a pointer tounsigned integer.uMatches an optionally signed decimal integer, whose format is the same asexpected for the subject sequence of the strtoul function with the value 10for the base argument. The corresponding argument shall be a pointer tounsigned integer.xMatches an optionally signed hexadecimal integer, whose format is the sameas expected for the subject sequence of the strtoul function with the value16 for the base argument.

The corresponding argument shall be a pointer tounsigned integer.a,e,f,g Matches an optionally signed floating-point number, infinity, or NaN, whoseformat is the same as expected for the subject sequence of the strtodfunction. The corresponding argument shall be a pointer to floating.cMatches a sequence of characters of exactly the number specified by the fieldwidth (1 if no field width is present in the directive).252)If no l length modifier is present, the corresponding argument shall be apointer to the initial element of a character array large enough to accept thesequence. No null character is added.If an l length modifier is present, the input shall be a sequence of multibytecharacters that begins in the initial shift state.

Each multibyte character in thesequence is converted to a wide character as if by a call to the mbrtowcfunction, with the conversion state described by an mbstate_t objectinitialized to zero before the first multibyte character is converted. Thecorresponding argument shall be a pointer to the initial element of an array ofwchar_t large enough to accept the resulting sequence of wide characters.No null wide character is added.sMatches a sequence of non-white-space characters.252)If no l length modifier is present, the corresponding argument shall be apointer to the initial element of a character array large enough to accept thesequence and a terminating null character, which will be added automatically.If an l length modifier is present, the input shall be a sequence of multibyte252) No special provisions are made for multibyte characters in the matching rules used by the c, s, and [conversion specifiers — the extent of the input field is determined on a byte-by-byte basis.

Характеристики

Тип файла
PDF-файл
Размер
3,61 Mb
Тип материала
Высшее учебное заведение

Список файлов книги

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