Category:Dc: Difference between revisions

array correction & mine also has ~; GNU extension?
(dc commands)
(array correction & mine also has ~; GNU extension?)
Line 3:
Commands in POSIX dc
number : push a number
+ - / * % ^ : arithmetic operations: add sub div mul mod exp
sx Sx : pop the stack and save or push it to register x
lx Lx : copy | pop the register x to main stack.
Line 29:
? : read input and execute.
Y : debug information
a b ;:r : store r[b] = a (r is register)
a ;r : retrieve r[b]
 
Line 35:
 
n : print value without a new line
~ : arithmetic - divmod
| : arithmetic - modular exponentiation
r : swap the top two elements
Anonymous user