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 decimal part can be separated by comma or period and should be different
from digit groups separator from digit groups separator
.IP \[bu] 2 .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 .PP
You can use any of these variations when recording data. You can use any of these variations when recording data.
However, there is some ambiguous way of representing numbers like However, there is some ambiguous way of representing numbers like

View File

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