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

Filter input #136

Closed
wants to merge 7 commits into from
Closed

Filter input #136

wants to merge 7 commits into from

Conversation

meisenzahl
Copy link
Member

Resolves #133

@meisenzahl
Copy link
Member Author

On keyboard input % is not accepted as valid input and a warning is shown.

Should the input using the % button still be possible or should the button be removed?

Referring to discussion in #44 with reference to https://speedcrunch.org/userguide/syntax.html#deprecated-operators.

Peek 2020-08-29 07-56

Copy link
Collaborator

@jeremypw jeremypw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for you first contribution to Calculator!
As you mention the question of the % button (which still works and still can give rise to an ambiguous calculation) is outstanding.
A simple solution to the % button is to cause it to complete any pending calculation first and then apply the % operation (i.e. divide by 100). That way you never see the % entered into the pending calculation.

It seems shame that there is no quick way to increase (or decrease) a number by x% though. I guess that can be fixed in another PR if agreement can be found on how to do it. Maybe by allowing a +% operator, so 50 +% 10 = 55.

I've proposed one solution here: #137

@meisenzahl
Copy link
Member Author

I'm closing this because I don't know how to proceed.

@meisenzahl meisenzahl closed this Jan 30, 2021
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

Successfully merging this pull request may close these issues.

Warn on % input
3 participants