~ubuntu-branches/ubuntu/trusty/bc/trusty

« back to all changes in this revision

Viewing changes to doc/dc.1

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-12-05 12:24:03 UTC
  • mfrom: (3.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20071205122403-rv1a7x90ktu1wl95
Tags: 1.06.94-3ubuntu1
* Merge with Debian; remaining changes:
  - Make bc/dc notice read and write errors on its input and output.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
.\" dc.1 - the *roff document processor source for the dc manual
3
3
.\"
4
4
.\" This file is part of GNU dc.
5
 
.\" Copyright (C) 1994, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
 
5
.\" Copyright (C) 1994, 1997, 1998, 2000, 2001, 2005, 2006 Free Software Foundation, Inc.
6
6
.\"
7
7
.\" This program is free software; you can redistribute it and/or modify
8
8
.\" it under the terms of the GNU General Public License as published by
17
17
.\" You should have received a copy of the GNU General Public License
18
18
.\" along with this program; see the file COPYING.  If not, write to:
19
19
.\"   The Free Software Foundation, Inc.
20
 
.\"   59 Temple Place, Suite 330
21
 
.\"   Boston, MA 02111 USA
 
20
.\"   51 Franklin Street, Fifth Floor
 
21
.\"   Boston, MA 02110-1301  USA
22
22
.\"
23
 
.TH DC 1 "2001-05-13" "GNU Project"
 
23
.TH DC 1 "2006-04-29" "GNU Project"
24
24
.ds dc \fIdc\fP
25
25
.ds Dc \fIDc\fP
26
26
.SH NAME
28
28
.SH SYNOPSIS
29
29
dc [-V] [--version] [-h] [--help]
30
30
   [-e scriptexpression] [--expression=scriptexpression]
31
 
   [-E scriptexpression] [--initexpr=scriptexpression]
32
31
   [-f scriptfile] [--file=scriptfile]
33
32
   [file ...]
34
33
.SH DESCRIPTION
49
48
.PP
50
49
To enter a number in
51
50
.IR dc ,
52
 
type the digits with an optional decimal point.
 
51
type the digits
 
52
(using upper case letters
 
53
.I A
 
54
through
 
55
.I F
 
56
as "digits" when working
 
57
with input bases greater than ten),
 
58
with an optional decimal point.
53
59
Exponential notation is not supported.
54
60
To enter a negative number,
55
61
begin the number with ``_''.
80
86
Add the commands in
81
87
.I script
82
88
to the set of commands to be run while processing the input.
83
 
.B -E \fIscript\fP
84
 
.TP
85
 
.BI --initexpr= script
86
 
Add the commands in
87
 
.I script
88
 
to the set of commands to be run while processing the input, but unlike
89
 
-e, execute stdin if no other files specified.
90
89
.TP
91
90
.B -f \fIscript-file\fP
92
91
.TP
453
452
calculates the number of digits it has
454
453
(or number of characters, if it is a string)
455
454
and pushes that number.
 
455
The digit count for a number does
 
456
.I not
 
457
include any leading zeros,
 
458
even if those appear to the right of the radix point.
456
459
.TP
457
460
.B X
458
461
Pops a value off the stack,
498
501
because the 2 was stored in an instance of 0:a that
499
502
was later popped.
500
503
.SH
501
 
FILES
502
 
.TP 15
503
 
~/.dcrc
504
 
The commands in this file will be executed when
505
 
.I dc
506
 
is first run.
507
 
.PP
508
 
.SH
509
504
BUGS
510
505
.PP
511
506
Email bug reports to