aboutsummaryrefslogtreecommitdiff
path: root/manuals/bc/NP.1
diff options
context:
space:
mode:
Diffstat (limited to 'manuals/bc/NP.1')
-rw-r--r--manuals/bc/NP.171
1 files changed, 35 insertions, 36 deletions
diff --git a/manuals/bc/NP.1 b/manuals/bc/NP.1
index a89f6ec17271..149037fd9705 100644
--- a/manuals/bc/NP.1
+++ b/manuals/bc/NP.1
@@ -25,19 +25,18 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual"
+.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual"
.SH NAME
.PP
bc - arbitrary-precision decimal arithmetic language and calculator
.SH SYNOPSIS
.PP
-\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]]
-[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]]
-[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]]
-[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]]
-[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]]
-[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R]
-\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...]
+\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]]
+[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]]
+[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]]
+[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]]
+[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R]
+\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...]
[\f[I]file\f[R]\&...]
.SH DESCRIPTION
.PP
@@ -60,7 +59,7 @@ implementations.
.PP
The following are the options that bc(1) accepts.
.TP
-\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R]
+\f[B]-g\f[R], \f[B]--global-stacks\f[R]
Turns the globals \f[B]ibase\f[R], \f[B]obase\f[R], \f[B]scale\f[R], and
\f[B]seed\f[R] into stacks.
.RS
@@ -152,10 +151,10 @@ is ignored.
This is a \f[B]non-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]\[en]help\f[R]
+\f[B]-h\f[R], \f[B]--help\f[R]
Prints a usage message and quits.
.TP
-\f[B]-i\f[R], \f[B]\[en]interactive\f[R]
+\f[B]-i\f[R], \f[B]--interactive\f[R]
Forces interactive mode.
(See the \f[B]INTERACTIVE MODE\f[R] section.)
.RS
@@ -163,7 +162,7 @@ Forces interactive mode.
This is a \f[B]non-portable extension\f[R].
.RE
.TP
-\f[B]-l\f[R], \f[B]\[en]mathlib\f[R]
+\f[B]-l\f[R], \f[B]--mathlib\f[R]
Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R]
and loads the included math library and the extended math library before
running any code, including any expressions or files specified on the
@@ -173,25 +172,25 @@ command line.
To learn what is in the libraries, see the \f[B]LIBRARY\f[R] section.
.RE
.TP
-\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R]
+\f[B]-P\f[R], \f[B]--no-prompt\f[R]
This option is a no-op.
.RS
.PP
This is a \f[B]non-portable extension\f[R].
.RE
.TP
-\f[B]-q\f[R], \f[B]\[en]quiet\f[R]
+\f[B]-q\f[R], \f[B]--quiet\f[R]
This option is for compatibility with the GNU
bc(1) (https://www.gnu.org/software/bc/); it is a no-op.
Without this option, GNU bc(1) prints a copyright header.
This bc(1) only prints the copyright header if one or more of the
-\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given.
+\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given.
.RS
.PP
This is a \f[B]non-portable extension\f[R].
.RE
.TP
-\f[B]-s\f[R], \f[B]\[en]standard\f[R]
+\f[B]-s\f[R], \f[B]--standard\f[R]
Process exactly the language defined by the
standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html)
and error if any extensions are used.
@@ -200,15 +199,15 @@ and error if any extensions are used.
This is a \f[B]non-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R]
+\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R]
Print the version information (copyright header) and exit.
.RS
.PP
This is a \f[B]non-portable extension\f[R].
.RE
.TP
-\f[B]-w\f[R], \f[B]\[en]warn\f[R]
-Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and
+\f[B]-w\f[R], \f[B]--warn\f[R]
+Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and
not errors) are printed for non-standard extensions and execution
continues normally.
.RS
@@ -216,7 +215,7 @@ continues normally.
This is a \f[B]non-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R]
+\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R]
Evaluates \f[I]expr\f[R].
If multiple expressions are given, they are evaluated in order.
If files are given as well (see below), the expressions and files are
@@ -229,17 +228,17 @@ If this option is given on the command-line (i.e., not in
\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section),
then after processing all expressions and files, bc(1) will exit, unless
\f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to
-\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in
+\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in
\f[B]BC_ENV_ARGS\f[R].
-However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R],
-\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after
+However, if any other \f[B]-e\f[R], \f[B]--expression\f[R],
+\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after
\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and
exit.
.PP
This is a \f[B]non-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R]
+\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R]
Reads in \f[I]file\f[R] and evaluates it, line by line, as though it
were read through \f[B]stdin\f[R].
If expressions are also given (see above), the expressions are evaluated
@@ -250,9 +249,9 @@ If this option is given on the command-line (i.e., not in
\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section),
then after processing all expressions and files, bc(1) will exit, unless
\f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to
-\f[B]-f\f[R] or \f[B]\[en]file\f[R].
-However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R],
-\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after
+\f[B]-f\f[R] or \f[B]--file\f[R].
+However, if any other \f[B]-e\f[R], \f[B]--expression\f[R],
+\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after
\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and
exit.
.PP
@@ -317,8 +316,8 @@ constant numbers.
It is the \[lq]input\[rq] base, or the number base used for interpreting
input numbers.
\f[B]ibase\f[R] is initially \f[B]10\f[R].
-If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R]
-(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max
+If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R]
+(\f[B]--warn\f[R]) flags were not given on the command line, the max
allowable value for \f[B]ibase\f[R] is \f[B]36\f[R].
Otherwise, it is \f[B]16\f[R].
The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R].
@@ -577,7 +576,7 @@ The following arithmetic and logical operators can be used.
They are listed in order of decreasing precedence.
Operators in the same group have the same precedence.
.TP
-\f[B]++\f[R] \f[B]\[en]\f[R]
+\f[B]++\f[R] \f[B]--\f[R]
Type: Prefix and Postfix
.RS
.PP
@@ -687,7 +686,7 @@ Description: \f[B]boolean or\f[R]
.PP
The operators will be described in more detail below.
.TP
-\f[B]++\f[R] \f[B]\[en]\f[R]
+\f[B]++\f[R] \f[B]--\f[R]
The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R]
operators behave exactly like they would in C.
They require a named expression (see the \f[I]Named Expressions\f[R]
@@ -1133,7 +1132,7 @@ This is a \f[B]non-portable extension\f[R].
.PP
All of the functions below, including the functions in the extended math
library (see the \f[I]Extended Library\f[R] subsection below), are
-available when the \f[B]-l\f[R] or \f[B]\[en]mathlib\f[R] command-line
+available when the \f[B]-l\f[R] or \f[B]--mathlib\f[R] command-line
flags are given, except that the extended math library is not available
when the \f[B]-s\f[R] option, the \f[B]-w\f[R] option, or equivalents
are given.
@@ -1194,7 +1193,7 @@ Functions\f[R] subsection below).
.SS Extended Library
.PP
The extended library is \f[I]not\f[R] loaded when the
-\f[B]-s\f[R]/\f[B]\[en]standard\f[R] or \f[B]-w\f[R]/\f[B]\[en]warn\f[R]
+\f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--warn\f[R]
options are given since they are not part of the library defined by the
standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html).
.PP
@@ -1952,11 +1951,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since
bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts
more input when one of those errors occurs in interactive mode.
This is also the case when interactive mode is forced by the
-\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option.
+\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option.
.PP
These exit statuses allow bc(1) to be used in shell scripting with error
checking, and its normal behavior can be forced by using the
-\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option.
+\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option.
.SH INTERACTIVE MODE
.PP
Per the
@@ -1964,7 +1963,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html),
bc(1) has an interactive mode and a non-interactive mode.
Interactive mode is turned on automatically when both \f[B]stdin\f[R]
and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag
-and \f[B]\[en]interactive\f[R] option can turn it on in other cases.
+and \f[B]--interactive\f[R] option can turn it on in other cases.
.PP
In interactive mode, bc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes