Configurable decimal symbol in Calc package #70

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

Comments

Projects
None yet
6 participants
@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

This comment has been minimized.

Show comment
Hide comment
@gschenck

gschenck Jul 6, 2016

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

calc2.7.diff.txt

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

This comment has been minimized.

Show comment
Hide comment
@polyvertex

polyvertex Jul 11, 2016

Member

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

Member

polyvertex commented Jul 11, 2016

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

@ThaSiouL

This comment has been minimized.

Show comment
Hide comment
@ThaSiouL

ThaSiouL 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 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

This comment has been minimized.

Show comment
Hide comment
@ThaSiouL

ThaSiouL Aug 3, 2016

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

updated version posted in #98

ThaSiouL commented Aug 3, 2016

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

updated version posted in #98

@psistorm

This comment has been minimized.

Show comment
Hide comment
@psistorm

psistorm 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

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

This comment has been minimized.

Show comment
Hide comment
@ThaSiouL

ThaSiouL 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.)

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

This comment has been minimized.

Show comment
Hide comment
@mnsc

mnsc 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)

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

This comment has been minimized.

Show comment
Hide comment
@ThaSiouL

ThaSiouL Aug 16, 2016

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

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

@polyvertex

This comment has been minimized.

Show comment
Hide comment
@polyvertex

polyvertex Aug 20, 2016

Member

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

Member

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