(dc.info)Registers


Next: Parameters Prev: Stack Control Up: Top
Enter node , (file) or (file)node

6 Registers
***********

'dc' provides at least 256 memory registers(1), each named by a single
character.  You can store a number in a register and retrieve it later.

'sR'
     Pop the value off the top of the stack and store it into register
     R.

'lR'
     Copy the value in register R, and push it onto the stack.  The
     value '0' is retrieved if the register is uninitialized or its
     stack has become empty.  This does not alter the contents of R.

     Each register also contains its own stack.  The current register
     value is the top of the register's stack.

'SR'
     Pop the value off the top of the (main) stack and push it onto the
     stack of register R.  The previous value of the register becomes
     inaccessible.

'LR'
     Pop the value off the top of register R's stack and push it onto
     the main stack.  The previous value in register R's stack, if any,
     is now accessible via the 'lR' command.

   ---------- Footnotes ----------

   (1) The exact number of registers provided by 'dc' depends on the
range of an 'unsigned char' in the C compiler used to create the 'dc'
executable.


automatically generated by info2www version 1.2.2.9