4 ms·
I wish it automatically captured the last result and let you easily use it in your next input. The current command line calculator I'm using also lacks this. >
by socialist_coder 10y ago
I wish it automatically captured the last result and let you easily use it in your next input. The current command line calculator I'm using also lacks this.
> 5+20
> = 25
> +10
> = 35
- sharkdp 10y agoThank you for the feedback. You can use `ans` to refer to the last result: > 5+20 25 > ans+10 35
- socialist_coder 10y agoThat should be in the docs!
- sharkdp 10y agoDone, thanks!
- cjwoodall 10y agoPython and a few other REPLs seem to use _ to capture the previous result. Could be a useful shorthand (not to complicated your design at all)