www.delorie.com/gnu/docs/bc/dc_5.html   search  
 
Buy GNU books!


dc, an arbitrary precision calculator

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5. Stack Control

`c'
Clears the stack, rendering it empty.

`d'
Duplicates the value on the top of the stack, pushing another copy of it. Thus, `4d*p' computes 4 squared and prints it.

`r'
Reverses the order of (swaps) the top two values on the stack. (This command is a GNU extension.)


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003