Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resquest: Auto-insert 'ans' #70

Open
bokeron2020 opened this issue Sep 28, 2021 · 3 comments
Open

Resquest: Auto-insert 'ans' #70

bokeron2020 opened this issue Sep 28, 2021 · 3 comments

Comments

@bokeron2020
Copy link

Hi!

Since I chose Kalker as my pc calculator I am noticing a few things I misss or would like Kalker to do.

One of those things is ability to continue an operation based on previous result.
Yes, that's what ans is for. I use 'ans' when the calculation involving the previous result is complex or ans is not the first item in the command line.

What I miss is the ability to input expressions like '+2' and be interpreted as 'ans+2', or in other words I would like that a command line that starts with an operator was autocompleted with 'ans' before the operator.

BTW, 'ans' defaults to 1. That was not expected, I supposed it would default to 0. For this 'ans autocompletion' I'm talking about maybe it should default to 0.

@bokeron2020 bokeron2020 changed the title Resquest: Auto-add 'ans' Resquest: Auto-insert 'ans' Sep 28, 2021
@PaddiM8
Copy link
Owner

PaddiM8 commented Sep 29, 2021

This would be very convenient! However, wouldn't it get confusing when it comes to subtraction? A minus sign at the start could just be a negative number.

>> 1+2
2
>> +3
5
>> -2
-2 or 3?

@bokeron2020
Copy link
Author

bokeron2020 commented Sep 29, 2021

Hmm... off the top of my head I see 3 ways to handle it only at the beginning of an empty command line:

  • Doubling the first operator to indicate you want 'ans' inserted >> --5 or //3
  • Using a '.' (dot) as first character just before an operator >> .-5
  • Tab completion that insert 'ans' when the line is empty

I guess I prefer the first option but I don't know what would fit better in your development plans (if you intend to continue developing this, of course).

The calculators I've had in my life used what was suitable for them. Simpler calculators didn't have the 'ans' or 'negative' functionality to deal with so they assumed you wanted this. I've also had a bunch of more advanced ones ... I remember one of them had two minus buttons, one for operation, one for negative sign. Doing that in pc would be messy. I don't remember how the rest of them managed this.

When I'm doing basic operations I stay at the numpad section of the keyboard, which is faster. Having to write 'ans' kinda get me out of rythm, so to speak.

@PaddiM8
Copy link
Owner

PaddiM8 commented Sep 29, 2021

Hmm these options seem a bit unintuitive, but I do agree that this would be very convenient. Good point with the numpad as well, it would be good find a solution that is compatible with this. Hmm I'll think about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants