Bug 4255

Summary: dc: example fails
Product: Busybox Reporter: Bee <200309>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: 1.19.x   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

Description Bee 2011-09-23 15:45:34 UTC
dc: example fails

'dc 8 8 * 2 2 + / p' -> 16

The '*' needs to be escaped on the commandline as:

'dc 8 8 \* 2 2 + / p' -> 16

or

'dc 8 8 mul 2 2 + / p' -> 16


BusyBox v1.19.2 (2011-09-22 22:34:25 PDT) multi-call binary.

Usage: dc EXPRESSION...

Tiny RPN calculator. Operations:
+, add, -, sub, *, mul, /, div, %, mod, **, exp, and, or, not, eor,
p - print top of the stack (without popping),
f - print entire stack,
o - pop the value and set output radix (must be 10, 16, 8 or 2).
Examples: 'dc 2 2 add p' -> 4, 'dc 8 8 * 2 2 + / p' -> 16
Comment 1 Denys Vlasenko 2013-01-18 12:31:14 UTC
Fixed in git.