DigitBlock

DigitBlock

is an option for NumberForm and related functions that specifies the maximum length of blocks of digits between breaks.

Details

  • The default setting is DigitBlock->Infinity, which specifies that no breaks should be inserted.
  • DigitBlock->n inserts a break every n digits. »
  • DigitBlock->{nleft,nright} inserts a break every nleft digits to the left of the decimal point, and every nright digits to the right of the decimal point. »
  • The setting for NumberSeparator determines what string should be used at each break. »
  • DigitBlock can also be used to specify what to assume for interpretation of numbers with Interpreter["Number",].

Examples

open allclose all

Basic Examples  (3)

Separate integer digits in blocks of 3:

Separate real digits in blocks of 2:

Use threedigit blocks on the left of the decimal and twodigit blocks on the right:

Scope  (5)

Use DigitBlock with PaddedForm:

EngineeringForm:

ScientificForm:

AccountingForm:

Specify spaces as separators:

Use commas as separators on the left and no separators on the right:

Use different block sizes and separators on the left and right:

A number with threedigit blocks:

Reverse the roles of periods and commas:

Wolfram Research (1988), DigitBlock, Wolfram Language function, https://reference.wolfram.com/language/ref/DigitBlock.html (updated 2014).

Text

Wolfram Research (1988), DigitBlock, Wolfram Language function, https://reference.wolfram.com/language/ref/DigitBlock.html (updated 2014).

CMS

Wolfram Language. 1988. "DigitBlock." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/DigitBlock.html.

APA

Wolfram Language. (1988). DigitBlock. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DigitBlock.html

BibTeX

@misc{reference.wolfram_2024_digitblock, author="Wolfram Research", title="{DigitBlock}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/DigitBlock.html}", note=[Accessed: 14-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_digitblock, organization={Wolfram Research}, title={DigitBlock}, year={2014}, url={https://reference.wolfram.com/language/ref/DigitBlock.html}, note=[Accessed: 14-November-2024 ]}