国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

xprintf format string

2019-11-08 18:42:54
字體:
來源:轉載
供稿:網友

說明:xPRintf表示printf系列的函數。

The  format string is a character string, beginning and ending in its initial shift state, if any. 

The format string is composed of zero or more directives:

格式說明串主要包含兩部分,普通字符轉換說明符

1. ordinary characters (not %), which are copied unchanged to the output stream;

    普通字符直接輸出

2. conversion specifications, each of which results in fetching  zero  or  more subsequent arguments.  

    Each conversion specification is introduced by the character %, and ends with a conversion specifier. 

     轉換說明符形如%d,可能需要0個或多個后序參數

   

  "%  [flags ...]  [minimum field width] [precision]  [length modifier] conversion-specifications"

[flags ...]

#  加前綴,o->0, x->0x

0  converted value is padded on the left with zeros rather than blanks.

-   The converted value is to be left adjusted on the field  boundary.

' '  A blank should be left before a positive  number  (or empty string) produced by a signed conversion.

+  A  sign  (+  or -) should always be placed before a number produced by a signed conversion.

[minimum field width]

            如果結果位寬不足,則用空格填充;如果位寬超過限制也不會造成結果被截斷,而是忽略位寬限制

[precision]    

格式為.[num],如果只有小數點則取精度為0;負數忽略該限制;

This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions

This gives the  number of digits to appear after the radix character for a, A, e, E, f, and F conversions

the maximum number of significant digits for g and G conversions

the maximum  number of characters to be printed from a string for s and S conversions.

[length modifier]

hh --> char

h   --> short int

l    --> long int

ll   --> long long int

L  --> long double

z  --> sizt_t

t   --> ptrdiff_t

conversion specifications (A  character that specifies the type of conversion to be applied. )

d,i : int --> signed decimal

o,u,x,X : unsigned int --> unsigned octal,hexadecimal

e,E: The double argument is  rounded  and  converted  in  the  style [-]d.ddde±dd


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 淄博市| 丰城市| 盐亭县| 兰坪| 宁阳县| 沽源县| 建德市| 平塘县| 凤阳县| 抚宁县| 汝州市| 景宁| 鱼台县| 荔浦县| 延边| 固原市| 盘锦市| 无锡市| 漳浦县| 安福县| 星子县| 如东县| 宁海县| 台安县| 乌拉特后旗| 瓦房店市| 怀宁县| 宜兰县| 青川县| 佛教| 江门市| 循化| 龙胜| 赣榆县| 肥东县| 佛山市| 靖江市| 左权县| 金山区| 曲沃县| 长治市|