summaryrefslogtreecommitdiff
path: root/manuals/dc/A.1.md
diff options
context:
space:
mode:
Diffstat (limited to 'manuals/dc/A.1.md')
-rw-r--r--manuals/dc/A.1.md59
1 files changed, 48 insertions, 11 deletions
diff --git a/manuals/dc/A.1.md b/manuals/dc/A.1.md
index 618543d7f397..f678c5f5a869 100644
--- a/manuals/dc/A.1.md
+++ b/manuals/dc/A.1.md
@@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator
# SYNOPSIS
-**dc** [**-hiPRvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-no-read-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...]
+**dc** [**-hiPRvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-no-read-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] [**-I** *ibase*] [**-\-ibase**=*ibase*] [**-O** *obase*] [**-\-obase**=*obase*] [**-S** *scale*] [**-\-scale**=*scale*] [**-E** *seed*] [**-\-seed**=*seed*]
# DESCRIPTION
@@ -116,7 +116,7 @@ The following are the options that dc(1) accepts.
**-z**, **-\-leading-zeroes**
-: Makes bc(1) print all numbers greater than **-1** and less than **1**, and
+: Makes dc(1) print all numbers greater than **-1** and less than **1**, and
not equal to **0**, with a leading zero.
This can be set for individual numbers with the **plz(x)**, plznl(x)**,
@@ -157,13 +157,49 @@ The following are the options that dc(1) accepts.
This is a **non-portable extension**.
+**-I** *ibase*, **-\-ibase**=*ibase*
+
+: Sets the builtin variable **ibase** to the value *ibase* assuming that
+ *ibase* is in base 10. It is a fatal error if *ibase* is not a valid number.
+
+ If multiple instances of this option are given, the last is used.
+
+ This is a **non-portable extension**.
+
+**-O** *obase*, **-\-obase**=*obase*
+
+: Sets the builtin variable **obase** to the value *obase* assuming that
+ *obase* is in base 10. It is a fatal error if *obase* is not a valid number.
+
+ If multiple instances of this option are given, the last is used.
+
+ This is a **non-portable extension**.
+
+**-S** *scale*, **-\-scale**=*scale*
+
+: Sets the builtin variable **scale** to the value *scale* assuming that
+ *scale* is in base 10. It is a fatal error if *scale* is not a valid number.
+
+ If multiple instances of this option are given, the last is used.
+
+ This is a **non-portable extension**.
+
+**-E** *seed*, **-\-seed**=*seed*
+
+: Sets the builtin variable **seed** to the value *seed* assuming that *seed*
+ is in base 10. It is a fatal error if *seed* is not a valid number.
+
+ If multiple instances of this option are given, the last is used.
+
+ This is a **non-portable extension**.
+
All long options are **non-portable extensions**.
# STDIN
If no files are given on the command-line and no files or expressions are given
by the **-f**, **-\-file**, **-e**, or **-\-expression** options, then dc(1)
-read from **stdin**.
+reads from **stdin**.
However, there is a caveat to this.
@@ -1195,8 +1231,8 @@ dc(1) recognizes the following environment variables:
: If any expressions or expression files are given on the command-line with
**-e**, **-\-expression**, **-f**, or **-\-file**, then if this environment
variable exists and contains an integer, a non-zero value makes dc(1) exit
- after executing the expressions and expression files, and a non-zero value
- makes dc(1) not exit.
+ after executing the expressions and expression files, and a zero value makes
+ dc(1) not exit.
This environment variable overrides the default, which can be queried with
the **-h** or **-\-help** options.
@@ -1297,8 +1333,10 @@ setting is used. The default setting can be queried with the **-h** or
**-\-help** options.
TTY mode is different from interactive mode because interactive mode is required
-in the [bc(1) specification][1], and interactive mode requires only **stdin**
-and **stdout** to be connected to a terminal.
+in the bc(1) specification at
+https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html , and
+interactive mode requires only **stdin** and **stdout** to be connected to a
+terminal.
## Command-Line History
@@ -1381,8 +1419,9 @@ bc(1)
# STANDARDS
-The dc(1) utility operators are compliant with the operators in the bc(1)
-[IEEE Std 1003.1-2017 (“POSIX.1-2017”)][1] specification.
+The dc(1) utility operators are compliant with the operators in the IEEE Std
+1003.1-2017 (“POSIX.1-2017”) specification at
+https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html for bc(1).
# BUGS
@@ -1391,5 +1430,3 @@ None are known. Report bugs at https://git.yzena.com/gavin/bc.
# AUTHOR
Gavin D. Howard <gavin@yzena.com> and contributors.
-
-[1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html