| |
| | Dc (Unix) |
 | | This translates into "push four and five onto the stack, then, with the multiplication operator, pop two elements from the stack, multiply them and push the result back on the stack." Then the 'p' command is used to examine (print out to the screen) the first element on the stack. |
 | | In addition to these basic arithmetic and stack operations, dc includes support for macros, conditionals and storing of results for later retrieval; unfortunately the syntax is terse and complex programs in dc tend to be very hard to read. |
 | | The mechanism underlying macros and conditionals is the register, which in dc is a storage location with a single character name which can be stored to and retrieved from: 'sc' pops the top of the stack and stores it in register c, and 'lc' pushes the value of register c onto the stack. |
| encycl.opentopia.com /term/Dc_(Unix) (561 words) |
|