[英]What does an 'F' in the Format specifier of printf mean?
What does %.8Ff
format specifier in printf do? printf中的
%.8Ff
格式说明符做什么?
What does F
mean? F
是什么意思?
According to the manual : 根据手册 :
The F conversion specifier produces "INF", "INFINITY", or "NAN" instead of "inf", "infinity", or "nan", respectively.
F转换说明符分别产生“ INF”,“ INFINITY”或“ NAN”,而不是“ inf”,“ infinity”或“ nan”。
In your format string %.8Ff
, the f
is treated as a literal character and printed as an f
. 在格式字符串
%.8Ff
, f
被视为文字字符并被打印为f
。
将字面量f
放在格式说明符之后的一种可能用法是打印一个字符串,该字符串稍后由C或C ++编译器解析为float
常量而不是double
常量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.