NumberSigns
is an option for NumberForm and related functions which gives strings to use as signs for negative and positive numbers.
Details
- NumberSigns->{"sneg","spos"} specifies that "sneg" should be given as the sign for negative numbers, and "spos" for positive numbers.
- The default setting is NumberSigns->{"-",""}. »
- NumberSigns->{{"snleft","snright"},{"spleft","spright"}} specifies strings to put both on the left and right of numbers to specify their signs. »
- In AccountingForm, the default setting is NumberSigns->{{"(",")"},""}. »
- NumberSigns can also be used to specify the strings to assume for number signs with Interpreter["Number",…] and other related Interpreters.
Examples
open allclose allBasic Examples (4)
Positive and negative numbers with default number signs:
Parentheses are used for negative values in AccountingForm:
Scope (3)
Use NumberSigns with PaddedForm:
Use any strings as number signs:
Wrap positives with square brackets and negatives with parentheses:
Text
Wolfram Research (1991), NumberSigns, Wolfram Language function, https://reference.wolfram.com/language/ref/NumberSigns.html (updated 2014).
CMS
Wolfram Language. 1991. "NumberSigns." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/NumberSigns.html.
APA
Wolfram Language. (1991). NumberSigns. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NumberSigns.html