4silvertooth / QwikTape

Do calculations, annotate like you would on a paper "qwikly".
MIT License
230 stars 9 forks source link

Explicit Comment / Escape calculation symbol #11

Closed jwoodard80 closed 6 months ago

jwoodard80 commented 7 months ago

This is so brilliant!! Thank you! I've been using CalcTape for years but could not get the changes I'd like to have implemented.

Could we get an explicit comment character for the remainder of a line.

Example

Proposal

     120.00 # Interest as of 12/31/2023
+    400.00 # Income from 1-15-2024 to 2/01/2024 
══════════════
     520.00

Thank you for your work on this project!

4silvertooth commented 7 months ago

I'll add this feature in the next build. You will loose the ability to continue new calculation when pressing mathematical operator when comment stars with #. Pressing Enter followed by a mathematical operator will continue the calculations.

Edit: Need suggestion about using #, it would look very developer kind of thing, other users might find it confusing who doesn't know how comments work on programming languages, how about just starting the comment with " (double or single quote). Input appreciated.

Edit 2: Some issues, what happens if you remove the # comment with mathematical operators in comment, lets say 500 # from 01/01/2024 after deleting the char #, it will become an expression

        500.00 from 01
/         1.00
/     2,024.00
══════════════
          0.25
jwoodard80 commented 7 months ago

The same thing somewhat happens with calctape. You have the option to "switch" to a text editor mode that doesn't parse. When you switch back it doesn't automatically format the "date", however, anything entered after is parsed.

Maybe that made sense.... I've had little sleep. :-)

I was glancing over your code (I'm not a developer, just a reader, lol.) However, if I am understanding everything at a very high level, we're just parsing text. I was brainstorming if there could be a comment "wrapper" of some kind rather than a single #

I may need to think on it a bit more.

4silvertooth commented 7 months ago

I've added few changes to allow operators in annotations, it will work without any prefix symbol before annotation. Either press space and operator at the end of annotation to move to next line of calculations or press enter and continue with calculations.

4silvertooth commented 6 months ago

v0.7 includes this feature.