Deleted Added
full compact
dc.1 (256281) dc.1 (265533)
1.\" $FreeBSD: stable/10/usr.bin/dc/dc.1 235400 2012-05-13 14:16:04Z joel $
2.\" $OpenBSD: dc.1,v 1.24 2010/01/02 19:48:56 schwarze Exp $
1.\" $FreeBSD: stable/10/usr.bin/dc/dc.1 265533 2014-05-07 08:06:54Z delphij $
2.\" $OpenBSD: dc.1,v 1.27 2012/08/19 12:07:21 jmc Exp $
3.\"
4.\" Copyright (C) Caldera International Inc. 2001-2002.
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code and documentation must retain the above

--- 19 unchanged lines hidden (view full) ---

30.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
33.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34.\" POSSIBILITY OF SUCH DAMAGE.
35.\"
36.\" @(#)dc.1 8.1 (Berkeley) 6/6/93
37.\"
3.\"
4.\" Copyright (C) Caldera International Inc. 2001-2002.
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code and documentation must retain the above

--- 19 unchanged lines hidden (view full) ---

30.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
33.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34.\" POSSIBILITY OF SUCH DAMAGE.
35.\"
36.\" @(#)dc.1 8.1 (Berkeley) 6/6/93
37.\"
38.Dd January 22, 2010
38.Dd April 16, 2014
39.Dt DC 1
40.Os
41.Sh NAME
42.Nm dc
43.Nd desk calculator
44.Sh SYNOPSIS
45.Nm
46.Op Fl hxV

--- 21 unchanged lines hidden (view full) ---

68The options are as follows:
69.Bl -tag -width Ds
70.It Fl e Ar expr , Fl Fl expression Ar expr
71Evaluate
72.Ar expression .
73If multiple
74.Fl e
75options are specified, they will be processed in the order given.
39.Dt DC 1
40.Os
41.Sh NAME
42.Nm dc
43.Nd desk calculator
44.Sh SYNOPSIS
45.Nm
46.Op Fl hxV

--- 21 unchanged lines hidden (view full) ---

68The options are as follows:
69.Bl -tag -width Ds
70.It Fl e Ar expr , Fl Fl expression Ar expr
71Evaluate
72.Ar expression .
73If multiple
74.Fl e
75options are specified, they will be processed in the order given.
76If no
77.Ar filename
78argument is given, execution will stop after processing the expressions
79given on the command line,
80otherwise processing will continue with the contents of
81.Ar filename .
82.It Fl f Ar filename , Fl Fl file Ar filename
83Process the content of the given file before further calculations are done.
84If multiple
85.Fl f
86options are specified, they will be processed in the order given.
87.It Fl h , Fl Fl help
88Print short usage info.
89.It Fl V , Fl Fl version
90Print version info.
91.It Fl x
92Enable extended register mode.
93This mode is used by
94.Xr bc 1
95to allow more than 256 registers.
96See
97.Sx Registers
98for a more detailed description.
99.El
100.Pp
76.It Fl f Ar filename , Fl Fl file Ar filename
77Process the content of the given file before further calculations are done.
78If multiple
79.Fl f
80options are specified, they will be processed in the order given.
81.It Fl h , Fl Fl help
82Print short usage info.
83.It Fl V , Fl Fl version
84Print version info.
85.It Fl x
86Enable extended register mode.
87This mode is used by
88.Xr bc 1
89to allow more than 256 registers.
90See
91.Sx Registers
92for a more detailed description.
93.El
94.Pp
95If neither
96.Ar expression
97nor
98.Ar file
99are specified on the command line,
100.Nm
101reads from the standard input.
102Otherwise
103.Ar expression
104and
105.Ar file
106are processed and
107.Nm
108exits.
109.Pp
101Ordinarily,
102.Nm
103operates on decimal integers,
104but one may specify an input base, output base,
105and a number of fractional digits (scale) to be maintained.
110Ordinarily,
111.Nm
112operates on decimal integers,
113but one may specify an input base, output base,
114and a number of fractional digits (scale) to be maintained.
106If an argument is given,
107input is taken from that file until its end,
108then from the standard input.
109Whitespace is ignored, except where it signals the end of a number,
110end of a line or when a register name is expected.
111The following constructions are recognized:
112.Bl -tag -width "number"
113.It Va number
114The value of the number is pushed on the stack.
115A number is an unbroken string of the digits 0\-9 and letters A\-F.
116It may be preceded by an underscore

--- 432 unchanged lines hidden ---
115Whitespace is ignored, except where it signals the end of a number,
116end of a line or when a register name is expected.
117The following constructions are recognized:
118.Bl -tag -width "number"
119.It Va number
120The value of the number is pushed on the stack.
121A number is an unbroken string of the digits 0\-9 and letters A\-F.
122It may be preceded by an underscore

--- 432 unchanged lines hidden ---