dc: Introduction
1
1 1 Introduction
1 **************
1
1 'dc' is a reverse-polish desk calculator which supports unlimited
1 precision arithmetic. It also allows you to define and call macros.
1 Normally 'dc' reads from the standard input; if any command arguments
1 are given to it, they are filenames, and 'dc' reads and executes the
1 contents of the files instead of reading from standard input. All
1 normal output is to standard output; all error messages are written to
1 standard error.
1
1 To exit, use 'q'. 'C-c' (or whatever other keystroke your system
1 uses to generate a 'SIGINT') does not exit; it is used to abort macros
1 that are looping, etc.
1
1 A reverse-polish calculator stores numbers on a stack. Entering a
1 number pushes it on the stack. Arithmetic operations pop arguments off
1 the stack and push the results.
1
1 To enter a number in 'dc', type the digits (using upper case letters
1 'A' through 'F' as "digits" when working with input bases greater than
1 ten), with an optional decimal point. Exponential notation is not
1 supported. To enter a negative number, begin the number with '_'. '-'
1 cannot be used for this, as it is a binary operator for subtraction
1 instead. To enter two numbers in succession, separate them with spaces
1 or newlines; these have no meaning as commands.
1