Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Dc (computer program)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Registers=== In addition to these basic arithmetic and stack operations, dc includes support for [[Macro (computer science)|macros]], conditionals and storing of results for later retrieval. 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: <code>sc</code> pops the top of the stack and stores it in register c, and <code>lc</code> pushes the value of register c onto the stack. For example: <pre> 3 sc 4 lc * p </pre> Registers can also be treated as secondary stacks, so values can be pushed and popped between them and the main stack using the <code>S</code> and <code>L</code> commands.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)