Print this page
11622 clean up rarer mandoc lint warnings

*** 46,56 **** .\" .TH BC 1 "Aug 29, 2003" .SH NAME bc \- arbitrary precision arithmetic language .SH SYNOPSIS - .LP .nf \fB/usr/bin/bc\fR [\fB-c\fR] [\fB-l\fR] [\fIfile\fR]... .fi .LP --- 46,55 ----
*** 57,79 **** .nf \fB/usr/xpg6/bin/bc\fR [\fB-c\fR] [\fB-l\fR] [\fIfile\fR]... .fi .SH DESCRIPTION - .sp - .LP The \fBbc\fR utility implements an arbitrary precision calculator. It takes input from any files given, then reads from the standard input. If the standard input and standard output to \fBbc\fR are attached to a terminal, the invocation of \fBbc\fR is \fIinteractive\fR, causing behavioral constraints described in the following sections. \fBbc\fR processes a language that resembles C and is a preprocessor for the desk calculator program \fBdc\fR, which it invokes automatically unless the \fB-c\fR option is specified. In this case the \fBdc\fR input is sent to the standard output instead. .SH USAGE - .sp - .LP The syntax for \fBbc\fR programs is as follows: .sp .ne 2 .na \fB\fIL\fR\fR --- 56,74 ----
*** 100,114 **** .RS 5n Means a statement. .RE .SS "Comments" - .sp - .LP Enclosed in \fB/*\fR and \fB*/\fR. .SS "Names (Operands)" - .br .in +2 Simple variables: \fIL\fR. .in -2 .br .in +2 --- 95,106 ----
*** 118,129 **** .in +2 The words \fBibase\fR, \fBobase\fR (limited to \fBBC_BASE_MAX\fR), and \fBscale\fR (limited to \fBBC_SCALE_MAX\fR). .in -2 .SS "Other Operands" - .sp - .LP Arbitrarily long numbers with optional sign and decimal point. Strings of fewer than \fBBC_STRING_MAX\fR characters, between double quotes ("). \fB(\fR \fIE\fR \fB)\fR .sp .ne 2 --- 110,119 ----
*** 160,170 **** .RS 21n .RE .SS "Operators" - .sp .ne 2 .na \fB\fB+ \(mi * / % ^\fR\fR .ad .sp .6 --- 150,159 ----
*** 201,211 **** .RS 4n .RE .SS "Statements" - .br .in +2 \fIE\fR .in -2 .br .in +2 --- 190,199 ----
*** 237,247 **** .in -2 .sp .LP \&.string .SS "Function Definitions" - .br .in +2 \fBdefine\fR \fIL\fR \fB(\fR \fIL\fR \fB,\fR.\|.\|.\|\fB,\fR \fIL\fR \fB) {\fR .in -2 .br .in +2 --- 225,234 ----
*** 258,268 **** .br .in +2 \fB}\fR .in -2 .SS "Functions in \fB-l\fR Math Library" - .sp .ne 2 .na \fB\fBs(\fR\fIx\fR\fB)\fR\fR .ad .RS 10n --- 245,254 ----
*** 330,341 **** simultaneously. All variables are global to the program. \fBauto\fR variables are stacked during function calls. When using arrays as function arguments or defining them as automatic variables, empty square brackets must follow the array name. .SH OPTIONS - .sp - .LP The following operands are supported: .sp .ne 2 .na \fB\fB-c\fR\fR --- 316,325 ----
*** 344,354 **** Compiles only. The output is \fBdc\fR commands that are sent to the standard output. .RE .SS "/usr/bin/bc" - .sp .ne 2 .na \fB\fB-l\fR\fR .ad .RS 6n --- 328,337 ----
*** 355,365 **** Defines the math functions and initializes \fBscale\fR to \fB20\fR, instead of the default zero. .RE .SS "/usr/xpg6/bin/bc" - .sp .ne 2 .na \fB\fB-l\fR\fR .ad .RS 6n --- 338,347 ----
*** 366,377 **** Defines the math functions and initializes \fBscale\fR to \fB20\fR, instead of the default zero. All math results have the scale of \fB20\fR. .RE .SH OPERANDS - .sp - .LP The following operands are supported: .sp .ne 2 .na \fB\fIfile\fR\fR --- 348,357 ----
*** 380,390 **** A pathname of a text file containing \fBbc\fR program statements. After all cases of \fIfile\fR have been read, \fBbc\fR reads the standard input. .RE .SH EXAMPLES - .LP \fBExample 1 \fRSetting the precision of a variable .sp .LP In the shell, the following assigns an approximation of the first ten digits of \fBn\fR to the variable \fIx\fR: --- 360,369 ----
*** 450,467 **** .fi .in -2 .sp .SH ENVIRONMENT VARIABLES - .sp - .LP See \fBenviron\fR(5) for descriptions of the following environment variables that affect the execution of \fBbc\fR: \fBLANG\fR, \fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR. .SH EXIT STATUS - .sp - .LP The following exit values are returned: .sp .ne 2 .na \fB\fB0\fR\fR --- 429,442 ----
*** 478,488 **** .RS 15n An error occurred. .RE .SH FILES - .sp .ne 2 .na \fB\fB/usr/lib/lib.b\fR\fR .ad .RS 25n --- 453,462 ----
*** 497,508 **** .RS 25n to define BC_ parameters .RE .SH ATTRIBUTES - .sp - .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS --- 471,480 ----
*** 513,529 **** _ Interface Stability Standard .TE .SH SEE ALSO - .sp - .LP \fBdc\fR(1), \fBawk\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5) .SH NOTES - .sp - .LP The \fBbc\fR command does not recognize the logical operators \fB&&\fR and \fB|\||\fR. .sp .LP The \fBfor\fR statement must have all three expressions (\fIE\fR's). --- 485,497 ----