doc: warn about digit group separators in scientific notation (#704, #706)

[ci skip]
This commit is contained in:
Simon Michael 2018-03-31 03:06:55 +01:00
parent 4ff3a749c6
commit 61a16870ab
4 changed files with 79 additions and 64 deletions

View File

@ -401,7 +401,12 @@ groups
decimal part can be separated by comma or period and should be different
from digit groups separator
.IP \[bu] 2
scientific E\-notation (without digit groups) is allowed
scientific E\-notation is allowed.
Be careful not to use a digit group separator character in scientific
notation, as it's not supported and it might get mistaken for a decimal
point.
(Declaring the digit group separator character explicitly with a
commodity directive will prevent this.)
.PP
You can use any of these variations when recording data.
However, there is some ambiguous way of representing numbers like

View File

@ -367,7 +367,11 @@ commodity name. Some examples:
all groups
* decimal part can be separated by comma or period and should be
different from digit groups separator
* scientific E-notation (without digit groups) is allowed
* scientific E-notation is allowed. Be careful not to use a digit
group separator character in scientific notation, as it's not
supported and it might get mistaken for a decimal point.
(Declaring the digit group separator character explicitly with a
commodity directive will prevent this.)
You can use any of these variations when recording data. However,
there is some ambiguous way of representing numbers like '$1.000' and
@ -1202,65 +1206,65 @@ Node: Account names11239
Ref: #account-names11382
Node: Amounts11869
Ref: #amounts12005
Node: Virtual Postings14800
Ref: #virtual-postings14959
Node: Balance Assertions16179
Ref: #balance-assertions16354
Node: Assertions and ordering17250
Ref: #assertions-and-ordering17436
Node: Assertions and included files18136
Ref: #assertions-and-included-files18377
Node: Assertions and multiple -f options18710
Ref: #assertions-and-multiple--f-options18964
Node: Assertions and commodities19096
Ref: #assertions-and-commodities19331
Node: Assertions and subaccounts20027
Ref: #assertions-and-subaccounts20259
Node: Assertions and virtual postings20780
Ref: #assertions-and-virtual-postings20987
Node: Balance Assignments21129
Ref: #balance-assignments21298
Node: Prices22418
Ref: #prices22551
Node: Transaction prices22602
Ref: #transaction-prices22747
Node: Market prices24903
Ref: #market-prices25038
Node: Comments25998
Ref: #comments26120
Node: Tags27362
Ref: #tags27480
Node: Directives28882
Ref: #directives28995
Node: Account aliases29188
Ref: #account-aliases29332
Node: Basic aliases29936
Ref: #basic-aliases30079
Node: Regex aliases30769
Ref: #regex-aliases30937
Node: Multiple aliases31655
Ref: #multiple-aliases31827
Node: end aliases32325
Ref: #end-aliases32465
Node: account directive32566
Ref: #account-directive32746
Node: apply account directive34093
Ref: #apply-account-directive34289
Node: Multi-line comments34948
Ref: #multi-line-comments35138
Node: commodity directive35266
Ref: #commodity-directive35450
Node: Default commodity36322
Ref: #default-commodity36495
Node: Default year37032
Ref: #default-year37197
Node: Including other files37620
Ref: #including-other-files37777
Node: Periodic transactions38174
Ref: #periodic-transactions38340
Node: Automated postings39329
Ref: #automated-postings39492
Node: EDITOR SUPPORT40394
Ref: #editor-support40519
Node: Virtual Postings15053
Ref: #virtual-postings15212
Node: Balance Assertions16432
Ref: #balance-assertions16607
Node: Assertions and ordering17503
Ref: #assertions-and-ordering17689
Node: Assertions and included files18389
Ref: #assertions-and-included-files18630
Node: Assertions and multiple -f options18963
Ref: #assertions-and-multiple--f-options19217
Node: Assertions and commodities19349
Ref: #assertions-and-commodities19584
Node: Assertions and subaccounts20280
Ref: #assertions-and-subaccounts20512
Node: Assertions and virtual postings21033
Ref: #assertions-and-virtual-postings21240
Node: Balance Assignments21382
Ref: #balance-assignments21551
Node: Prices22671
Ref: #prices22804
Node: Transaction prices22855
Ref: #transaction-prices23000
Node: Market prices25156
Ref: #market-prices25291
Node: Comments26251
Ref: #comments26373
Node: Tags27615
Ref: #tags27733
Node: Directives29135
Ref: #directives29248
Node: Account aliases29441
Ref: #account-aliases29585
Node: Basic aliases30189
Ref: #basic-aliases30332
Node: Regex aliases31022
Ref: #regex-aliases31190
Node: Multiple aliases31908
Ref: #multiple-aliases32080
Node: end aliases32578
Ref: #end-aliases32718
Node: account directive32819
Ref: #account-directive32999
Node: apply account directive34346
Ref: #apply-account-directive34542
Node: Multi-line comments35201
Ref: #multi-line-comments35391
Node: commodity directive35519
Ref: #commodity-directive35703
Node: Default commodity36575
Ref: #default-commodity36748
Node: Default year37285
Ref: #default-year37450
Node: Including other files37873
Ref: #including-other-files38030
Node: Periodic transactions38427
Ref: #periodic-transactions38593
Node: Automated postings39582
Ref: #automated-postings39745
Node: EDITOR SUPPORT40647
Ref: #editor-support40772

End Tag Table

View File

@ -280,7 +280,9 @@ As you can see, the amount format is somewhat flexible:
- negative amounts with a commodity on the left can have the minus sign before or after it
- digit groups (thousands, or any other grouping) can be separated by space or comma or period and should be used as separator between all groups
- decimal part can be separated by comma or period and should be different from digit groups separator
- scientific E-notation (without digit groups) is allowed
- scientific E-notation is allowed.
Be careful not to use a digit group separator character in scientific notation, as it's not supported and it might get mistaken for a decimal point.
(Declaring the digit group separator character explicitly with a commodity directive will prevent this.)
You can use any of these variations when recording data. However, there is some ambiguous way of representing numbers like `$1.000` and `$1,000` both may mean either one thousand or one dollar. By default hledger will assume that this is sole delimiter is used only for decimals. On the other hand commodity format declared prior to that line will help to resolve that ambiguity differently:

View File

@ -284,7 +284,11 @@ FILE FORMAT
o decimal part can be separated by comma or period and should be dif-
ferent from digit groups separator
o scientific E-notation (without digit groups) is allowed
o scientific E-notation is allowed. Be careful not to use a digit
group separator character in scientific notation, as it's not sup-
ported and it might get mistaken for a decimal point. (Declaring the
digit group separator character explicitly with a commodity directive
will prevent this.)
You can use any of these variations when recording data. However,
there is some ambiguous way of representing numbers like $1.000 and