mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Release calc version 2.11.11
This commit is contained in:
63
calc.man
63
calc.man
@@ -15,8 +15,8 @@
|
||||
.\" received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
.\"
|
||||
.\" @(#) $Revision: 29.17 $
|
||||
.\" @(#) $Id: calc.man,v 29.17 2004/10/23 00:58:33 chongo Exp $
|
||||
.\" @(#) $Revision: 29.18 $
|
||||
.\" @(#) $Id: calc.man,v 29.18 2005/10/18 11:10:18 chongo Exp $
|
||||
.\" @(#) $Source: /usr/local/src/cmd/calc/RCS/calc.man,v $
|
||||
.\"
|
||||
.\" Under source code control: 1991/07/23 05:48:26
|
||||
@@ -51,7 +51,7 @@ calc \- arbitrary precision calculator
|
||||
.RB [ \-s ]
|
||||
.RB [ \-u ]
|
||||
.RB [ \-v ]
|
||||
.RB [ calc_cmd\ \&.\|.\|. ]
|
||||
.RB [ [\-\-]\ calc_cmd\ \&.\|.\|. ]
|
||||
.in -5n
|
||||
.sp
|
||||
\fI#!${BINDIR}/calc\fP\ [other_flags\ \&...] \fB\-f\fP
|
||||
@@ -435,6 +435,21 @@ Disable buffering of stdin and stdout.
|
||||
Print the
|
||||
.B calc
|
||||
version number and exit.
|
||||
|
||||
.TP
|
||||
.B \-\-
|
||||
The double dash indicates to calc that no more option follow.
|
||||
Thus calc will ignore a later argument on the command line
|
||||
even if it starts with a dash.
|
||||
This is useful when entering negative values on the command line as in:
|
||||
.sp 1
|
||||
.in +5n
|
||||
.nf
|
||||
calc \-p \-\- \-1 - -7
|
||||
.sp 1
|
||||
.fi
|
||||
.in -5n
|
||||
|
||||
.PP
|
||||
|
||||
\&
|
||||
@@ -477,32 +492,50 @@ calc 23 + 47
|
||||
.fi
|
||||
.in -5n
|
||||
.sp 1
|
||||
should respond with display of 70, but
|
||||
will print 70.
|
||||
However, command lines will have problems:
|
||||
.sp 1
|
||||
.in +5n
|
||||
.nf
|
||||
calc 23 * 47
|
||||
.sp 1
|
||||
calc -23 + 47
|
||||
.fi
|
||||
.in -5n
|
||||
.sp 1
|
||||
may fail.
|
||||
Such cases can usually be made to work as expected by
|
||||
enclosing the command between single marks as in:
|
||||
The first example above fails because the shell interprets the '*'
|
||||
as a file glob.
|
||||
The second example fails because '\-23' is viewed as a calc option
|
||||
(which it is not) and do calc objects to that it thinks of as an unknown option.
|
||||
These cases can usually be made to work as expected by
|
||||
enclosing the command between quotes:
|
||||
.sp 1
|
||||
.in +5n
|
||||
.nf
|
||||
calc "23 * 47"
|
||||
.fi
|
||||
.in -5n
|
||||
calc '23 * 47'
|
||||
.sp 1
|
||||
and
|
||||
.sp 1
|
||||
.in +5n
|
||||
.nf
|
||||
calc "print sqrt(2), exp(1)"
|
||||
.fi
|
||||
.in -5n
|
||||
.sp
|
||||
.sp 1
|
||||
or in parentheses and quotes to avoid leading \-'s as in:
|
||||
.sp 1
|
||||
.in +5n
|
||||
.nf
|
||||
calc '(-23 + 47)'
|
||||
.fi
|
||||
.in -5n
|
||||
.sp 1
|
||||
One may also use a double dash to denote that calc options have ended as in:
|
||||
.sp 1
|
||||
.in +5n
|
||||
.nf
|
||||
calc -- -23 + 47
|
||||
.sp 1
|
||||
calc -q -- -23 + 47
|
||||
.fi
|
||||
.in -5n
|
||||
.sp 1
|
||||
If '!' is to be used to indicate the factorial function, for
|
||||
shells like
|
||||
.BI csh (1)
|
||||
|
Reference in New Issue
Block a user