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

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

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

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

If the subject sequence begins with a minussign, the sequence is interpreted as negated.294) A wide character sequence INF orINFINITY is interpreted as an infinity, if representable in the return type, else like afloating constant that is too large for the range of the return type. A wide charactersequence NAN or NAN(n-wchar-sequenceopt) is interpreted as a quiet NaN, if supportedin the return type, else like a subject sequence part that does not have the expected form;the meaning of the n-wchar sequences is implementation-defined.295) A pointer to thefinal wide string is stored in the object pointed to by endptr, provided that endptr isnot a null pointer.5If the subject sequence has the hexadecimal form and FLT_RADIX is a power of 2, thevalue resulting from the conversion is correctly rounded.6In other than the "C" locale, additional locale-specific subject sequence forms may beaccepted.7If the subject sequence is empty or does not have the expected form, no conversion isperformed; the value of nptr is stored in the object pointed to by endptr, providedthat endptr is not a null pointer.Recommended practice8If the subject sequence has the hexadecimal form, FLT_RADIX is not a power of 2, andthe result is not exactly representable, the result should be one of the two numbers in theappropriate internal format that are adjacent to the hexadecimal floating source value,with the extra stipulation that the error should have a correct sign for the current roundingdirection.294) It is unspecified whether a minus-signed sequence is converted to a negative number directly or bynegating the value resulting from converting the corresponding unsigned sequence (see F.5); the twomethods may yield different results if rounding is toward positive or negative infinity.

In either case,the functions honor the sign of zero if floating-point arithmetic supports signed zeros.295) An implementation may use the n-wchar sequence to determine extra information to be represented inthe NaN’s significand.§7.24.4.1.1Library373ISO/IEC 9899:TC39Committee Draft — Septermber 7, 2007WG14/N1256If the subject sequence has the decimal form and at most DECIMAL_DIG (defined in<float.h>) significant digits, the result should be correctly rounded.

If the subjectsequence D has the decimal form and more than DECIMAL_DIG significant digits,consider the two bounding, adjacent decimal strings L and U, both havingDECIMAL_DIG significant digits, such that the values of L, D, and U satisfy L ≤ D ≤ U.The result should be one of the (equal or adjacent) values that would be obtained bycorrectly rounding L and U according to the current rounding direction, with the extrastipulation that the error with respect to D should have a correct sign for the currentrounding direction.296)Returns10The functions return the converted value, if any. If no conversion could be performed,zero is returned.

If the correct value is outside the range of representable values, plus orminus HUGE_VAL, HUGE_VALF, or HUGE_VALL is returned (according to the returntype and sign of the value), and the value of the macro ERANGE is stored in errno. Ifthe result underflows (7.12.1), the functions return a value whose magnitude is no greaterthan the smallest normalized positive number in the return type; whether errno acquiresthe value ERANGE is implementation-defined.296) DECIMAL_DIG, defined in <float.h>, should be sufficiently large that L and U will usually roundto the same internal floating value, but if not will round to adjacent values.374Library§7.24.4.1.1WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC37.24.4.1.2 The wcstol, wcstoll, wcstoul, and wcstoull functionsSynopsis1#include <wchar.h>long int wcstol(const wchar_t * restrict nptr,wchar_t ** restrict endptr,int base);long long int wcstoll(const wchar_t * restrict nptr,wchar_t ** restrict endptr,int base);unsigned long int wcstoul(const wchar_t * restrict nptr,wchar_t ** restrict endptr,int base);unsigned long long int wcstoull(const wchar_t * restrict nptr,wchar_t ** restrict endptr,int base);Description2The wcstol, wcstoll, wcstoul, and wcstoull functions convert the initialportion of the wide string pointed to by nptr to long int, long long int,unsigned long int, and unsigned long long int representation,respectively.

First, they decompose the input string into three parts: an initial, possiblyempty, sequence of white-space wide characters (as specified by the iswspacefunction), a subject sequence resembling an integer represented in some radix determinedby the value of base, and a final wide string of one or more unrecognized widecharacters, including the terminating null wide character of the input wide string. Then,they attempt to convert the subject sequence to an integer, and return the result.3If the value of base is zero, the expected form of the subject sequence is that of aninteger constant as described for the corresponding single-byte characters in 6.4.4.1,optionally preceded by a plus or minus sign, but not including an integer suffix.

If thevalue of base is between 2 and 36 (inclusive), the expected form of the subject sequenceis a sequence of letters and digits representing an integer with the radix specified bybase, optionally preceded by a plus or minus sign, but not including an integer suffix.The letters from a (or A) through z (or Z) are ascribed the values 10 through 35; onlyletters and digits whose ascribed values are less than that of base are permitted.

If thevalue of base is 16, the wide characters 0x or 0X may optionally precede the sequenceof letters and digits, following the sign if present.§7.24.4.1.2Library375ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N12564The subject sequence is defined as the longest initial subsequence of the input widestring, starting with the first non-white-space wide character, that is of the expected form.The subject sequence contains no wide characters if the input wide string is empty orconsists entirely of white space, or if the first non-white-space wide character is otherthan a sign or a permissible letter or digit.5If the subject sequence has the expected form and the value of base is zero, the sequenceof wide characters starting with the first digit is interpreted as an integer constantaccording to the rules of 6.4.4.1.

If the subject sequence has the expected form and thevalue of base is between 2 and 36, it is used as the base for conversion, ascribing to eachletter its value as given above. If the subject sequence begins with a minus sign, the valueresulting from the conversion is negated (in the return type). A pointer to the final widestring is stored in the object pointed to by endptr, provided that endptr is not a nullpointer.6In other than the "C" locale, additional locale-specific subject sequence forms may beaccepted.7If the subject sequence is empty or does not have the expected form, no conversion isperformed; the value of nptr is stored in the object pointed to by endptr, providedthat endptr is not a null pointer.Returns8The wcstol, wcstoll, wcstoul, and wcstoull functions return the convertedvalue, if any.

If no conversion could be performed, zero is returned. If the correct valueis outside the range of representable values, LONG_MIN, LONG_MAX, LLONG_MIN,LLONG_MAX, ULONG_MAX, or ULLONG_MAX is returned (according to the return typesign of the value, if any), and the value of the macro ERANGE is stored in errno.7.24.4.2 Wide string copying functions7.24.4.2.1 The wcscpy functionSynopsis1#include <wchar.h>wchar_t *wcscpy(wchar_t * restrict s1,const wchar_t * restrict s2);Description2The wcscpy function copies the wide string pointed to by s2 (including the terminatingnull wide character) into the array pointed to by s1.Returns3The wcscpy function returns the value of s1.376Library§7.24.4.2.1WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC37.24.4.2.2 The wcsncpy functionSynopsis1#include <wchar.h>wchar_t *wcsncpy(wchar_t * restrict s1,const wchar_t * restrict s2,size_t n);Description2The wcsncpy function copies not more than n wide characters (those that follow a nullwide character are not copied) from the array pointed to by s2 to the array pointed to bys1.297)3If the array pointed to by s2 is a wide string that is shorter than n wide characters, nullwide characters are appended to the copy in the array pointed to by s1, until n widecharacters in all have been written.Returns4The wcsncpy function returns the value of s1.7.24.4.2.3 The wmemcpy functionSynopsis1#include <wchar.h>wchar_t *wmemcpy(wchar_t * restrict s1,const wchar_t * restrict s2,size_t n);Description2The wmemcpy function copies n wide characters from the object pointed to by s2 to theobject pointed to by s1.Returns3The wmemcpy function returns the value of s1.297) Thus, if there is no null wide character in the first n wide characters of the array pointed to by s2, theresult will not be null-terminated.§7.24.4.2.3Library377ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N12567.24.4.2.4 The wmemmove functionSynopsis1#include <wchar.h>wchar_t *wmemmove(wchar_t *s1, const wchar_t *s2,size_t n);Description2The wmemmove function copies n wide characters from the object pointed to by s2 tothe object pointed to by s1.

Copying takes place as if the n wide characters from theobject pointed to by s2 are first copied into a temporary array of n wide characters thatdoes not overlap the objects pointed to by s1 or s2, and then the n wide characters fromthe temporary array are copied into the object pointed to by s1.Returns3The wmemmove function returns the value of s1.7.24.4.3 Wide string concatenation functions7.24.4.3.1 The wcscat functionSynopsis1#include <wchar.h>wchar_t *wcscat(wchar_t * restrict s1,const wchar_t * restrict s2);Description2The wcscat function appends a copy of the wide string pointed to by s2 (including theterminating null wide character) to the end of the wide string pointed to by s1.

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

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

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

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