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

Explicit Comment / Escape calculation symbol #11

Closed
jwoodard80 opened this issue Mar 12, 2024 · 4 comments
Closed

Explicit Comment / Escape calculation symbol #11

jwoodard80 opened this issue Mar 12, 2024 · 4 comments

Comments

@jwoodard80
Copy link

jwoodard80 commented Mar 12, 2024

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

  • Giving a slash or dash will cause a divide or minus
         120.00 IE: 12-31-1900 or 12/31/1900
+       400.00 
══════════════
        520.00

Proposal

  • The hash key or some other key would denote that the rest of the line is a comment.
     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
Copy link
Owner

4silvertooth commented Mar 13, 2024

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
Copy link
Author

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 added a commit that referenced this issue Mar 14, 2024
new: #11 allowing operators in annotatins to input things like date
@4silvertooth
Copy link
Owner

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
Copy link
Owner

v0.7 includes this feature.

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

No branches or pull requests

2 participants