I’ve been spending a few hours playing with
dc(1)
. I’ve always had a fascination with stack-based programming languages (and concatenated languages in general like
The J Programming language), but have yet to work them into my every day set of tools. However,
dc
is two letters away and can read and write to the terminal in no time at all.
I’ll collect some notes here as I learn more.
Add a value (or values) to the stack.
p
– Print the top value of the stack (print? peek?) without affecting it.
k
– Set the decimal precision