语言环境是否有一个定义负号的 Facet?
Does the locale Have a Facet That Defines the Negative Symbol?
我原以为 numpunct
刻面包含有关用于负号的字符的信息。
我可以在语言环境的其他地方找到此信息,还是我必须假定它始终是 '-'
?
如果我们查看 num_put::put
中的 showpos
,它表示
For both integer and floating-point types, if showpos
is set, the modifier +
is prepended
所以我相信 +
将始终用于表示正数
integer ::= [sign] units
sign ::= plusminus
plusminus ::= '+' | '-'
我的意思是它将始终使用 -
作为负数,如果是正数则使用 +
,而 showpos
是 true
。如果不是这样,我希望它会像
integer ::= [sign] units
sign ::= plusminus
plusminus ::= plus | minus
我原以为 numpunct
刻面包含有关用于负号的字符的信息。
我可以在语言环境的其他地方找到此信息,还是我必须假定它始终是 '-'
?
如果我们查看 num_put::put
中的 showpos
,它表示
For both integer and floating-point types, if
showpos
is set, the modifier+
is prepended
所以我相信 +
将始终用于表示正数
integer ::= [sign] units sign ::= plusminus plusminus ::= '+' | '-'
我的意思是它将始终使用 -
作为负数,如果是正数则使用 +
,而 showpos
是 true
。如果不是这样,我希望它会像
integer ::= [sign] units sign ::= plusminus plusminus ::= plus | minus