dc(1) | dc(1) |
oThe top value on the stack is popped and used as the number radix for further output. See below for notes on output base.
Opushes the output base on the top of the stack.
kthe top of the stack is popped, and that value is used as a
Kpushes the scale factor on the top of the stack.
zThe stack level is pushed onto the stack.
Zreplaces the number on the top of the stack with its length.
?A line of input is taken from the input source (usually the terminal) and executed.
;and : Used by bc for array operations.
YGenerates debugging output for dc itself.
The input base may be any number, but only the digits
The output base may be any number. Bases in the range of
DIAGNOSTICS | Where x is an octal number. |
x is unimplemented | |
stack empty | There are insuf®cient elements on the stack to do what was asked. |
Out of space | The free list is exhausted (too many digits). |
Out of headers | Too many numbers are being kept around. |
Out of pushdown | Too many items are on the stack. |
Nesting Depth | There are too many levels of nested execution. |
EXAMPLES
This example prints the ®rst ten values of n! (n factorial):
[la1+dsa*pla10>y]sy
0sa1 lyx
SEE ALSO bc(1).
DC: An Interactive Desk Calculator tutorial in Number Processing Users Guide.
d
− 2 − | Section 1−171 |