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

Configurable decimal symbol in Calc package #70

Closed
QX4 opened this issue Jun 24, 2016 · 9 comments
Closed

Configurable decimal symbol in Calc package #70

QX4 opened this issue Jun 24, 2016 · 9 comments

Comments

@QX4
Copy link

@QX4 QX4 commented Jun 24, 2016

Use the decimal symbol set in Windows' Region and Language options (like Launchy) and/or make it an option in calc.ini.

@gschenck
Copy link

@gschenck gschenck commented Jul 6, 2016

You can use the following patch to allow using the "," as decimal symbol (and the "^" for "**").

calc2.7.diff.txt

@polyvertex
Copy link
Member

@polyvertex polyvertex commented Jul 11, 2016

FYI, the patch provided by @gschenck is still up-to-date as of v2.8.

@ThaSiouL
Copy link

@ThaSiouL ThaSiouL commented Aug 3, 2016

EDIT by @polyvertex: @ThaSiouL has published its contribution in a GitHub repository

If you want full configurability, you can use this version:
Calc.zip
By using Decimal_Sign you can change it in the ini, and for stuff you normally need the , for, you can use the point. (so pow(2,4. 3) instead of pow(2.4, 3))

@ThaSiouL
Copy link

@ThaSiouL ThaSiouL commented Aug 3, 2016

EDIT by @polyvertex: @ThaSiouL has published its contribution in a GitHub repository

updated version posted in #98

@psistorm
Copy link

@psistorm psistorm commented Aug 5, 2016

Another suggestion to realize usage of "^" instead of "**" would be provided by the following patch for the original calc.py. I would regard this as a more safe variant compared to replace()

calc.pow.patch.txt

I'm not sure whether to add it as PullRequest to ThaSiouL s repository or feel free to integrate it to official package

@ThaSiouL
Copy link

@ThaSiouL ThaSiouL commented Aug 5, 2016

I'd like to implement it for now. Would you like to make a request or should i merge it myself?
Edit: Merged 😄

(My idea was to make aliases configurable in the .ini file. But it seemed kinda overkill.)

@mnsc
Copy link

@mnsc mnsc commented Aug 14, 2016

The Calc-features was the first thing I tested since I have had problems with those plugins in Launchy. And since I'm swedish this configuration was my first stumbling point, it is needed to allow for our decimal comma. So many thanks for this patch!

Minor thing though, replacing the already used instances of comma with period is not the best option, it just looks wrong. Instead you should use the same approach as swedish Excel/VBA formulas and use semicolon for separating arguments, or at least make it configurable.

That is: pow(2,4; 3) instead of pow(2,4. 3)

@ThaSiouL
Copy link

@ThaSiouL ThaSiouL commented Aug 16, 2016

@mnsc great idea, i just implemented it in my modified version over here.

@polyvertex
Copy link
Member

@polyvertex polyvertex commented Aug 20, 2016

The Calc package has been greatly improved and released along with v2.9.

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

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.