nortakales / vs-code-qalc

Interactive scratchpad calculator for VS Code
MIT License
70 stars 2 forks source link

Support for value label #25

Closed vilicvane closed 9 months ago

vilicvane commented 2 years ago

Numi user tries to migrate Qalc here.

I use Numi for personal accounting, usage example:

E.g.:

food: 40 + 20 + 40
cloud service: 120
telecom: 100
sum
luis-c465 commented 1 year ago

Not the maintainer, but I looked into how this could be done, and it looks like it would require adding a custom operator to math.js which means adding it to parse.js as well

This might also be possible by using a regex to replace the : with a = before parsing with math.js

Here's an example of the regex

Screenshot 2023-05-19 at 9 27 03 AM
nortakales commented 1 year ago

You can actually get pretty close to this already like this: Screenshot 2023-05-25 204259

Is this close enough?

nortakales commented 9 months ago

Closing this issue out since I believe using = is comparable to : from Numi. If this is an issue (other than a quick re-learning or re-mapping your brain to the different symbol from Numi) feel free to reopen this.