Sample Header Ad - 728x90

How to capture user input in dc?

1 vote
1 answer
266 views
I'd like to handle user input in dc. For ?, info dc indicates: '?' Reads a line from the terminal and executes it. This command allows a macro to request input from the user. However, if I type this command sequence to square a number, followed by my input 9: ?d*p 9 I get: dc: stack empty dc: stack empty dc: stack empty Am I misinterpreting what ? does?
Asked by Yimin Rong (953 rep)
Jul 29, 2017, 12:42 PM
Last activity: Jul 29, 2017, 02:07 PM