Support comments in expressions

Issue #293 closed
Former user created an issue

Originally reported on Google Code with ID 293

What steps will reproduce the problem?
1. Go through a set of calculations to come up with a result, e.g. converting Mbits/sec
to 2
hours of data.
2. Get an answer that looks wrong
3. Review your steps in the "paper tape"and wonder what your steps were.

It would be so nice if I could annotate my calculations.  Maybe by separating with
a
comment character, thus:
 19.4  # ATSC MPEG-2 Mbits/sec
 ans / 8 # MBytes/sec
 ans * 60 * 60 # MBytes in an hour.

What is the expected output? 
  The comments would be displayed specially, e.g. in italics, and set off from the
calculations.
What do you see instead?
  I get errors.

I tried this using single and double quotes, and it works!  Is this an undocumented
feature? 
But there's no syntax highlighting of the "comment.

What version of the product are you using? On what operating system?
SpeedCrunch 0.10.1, KDE 4.2.4, Kubuntu 9.04

Reported by skierpage on 2009-06-14 01:17:38

Comments (20)

  1. Former user Account Deleted

    ``` I think this is a brilliant idea, thank you. ```

    Reported by `helder.pereira.correia` on 2009-06-18 14:13:11 - Status changed: `Accepted` - Labels added: Type-Enhancement, Priority-Low, Component-UI, Component-Logic, OpSys-All, Usability

  2. Former user Account Deleted

    ``` BTW, lots of other characters do the trick (\, &, etc), but that's totally unintentional. The parser needs to be improved. ```

    Reported by `helder.pereira.correia` on 2009-06-18 14:16:07

  3. Former user Account Deleted

    Reported by `helder.pereira.correia` on 2009-06-18 14:16:25 - Labels added: Milestone-0.11

  4. Former user Account Deleted

    ``` Issue 297 has been merged into this issue. ```

    Reported by `helder.pereira.correia` on 2009-07-25 14:56:53

  5. Former user Account Deleted

    ``` I just tried this and wanted to stick a note in that this works now in 0.10.1. I think it's of value for anybody who reads through this issue can see a recently-dated note that reports it is a success. ```

    Reported by `ryjobil` on 2011-12-16 17:24:08

  6. Former user Account Deleted

    ``` @ryjobil, what is "it" that works? I'm using Speedcrunch 0.10.1 / Qt 4.7.4 (Kubuntu 11.10 / KDE 4.7.3). My proposed syntax (# comment follows) doesn't work; 'comment follows and "comment follows work (and the other characters @helder mentions), but SpeedCrunch doesn't color-code or italicize the text. If quote followed by comment to end of line is going to continue to work then I suggest http://www.speedcrunch.org/en_US/features.html and/or http://www.speedcrunch.org/en_US/faq.html should document the syntax. ```

    Reported by `skierpage` on 2011-12-18 05:50:57

  7. Former user Account Deleted
    This is so needed, especially that we can't open multiple windows (at least on mac).
    I end up multiplexing  calculations of different types and get confused looking at
    the history.
    

    Reported by haridara on 2013-03-15 06:47:13

  8. Former user Account Deleted
    Added in commit 1b1b72fd8733d697b1a7adc52718eece19b0d3ff
    

    Reported by helder.pereira.correia on 2013-10-11 09:25:06 - Status changed: Fixed

  9. Former user Account Deleted
    Any text following a '?' (question mark character, inclusive) will be ignored for evaluation
    purposes. It is kept visible in the result display and history and has its own highlighting
    color.
    

    Reported by helder.pereira.correia on 2013-10-11 09:26:00

  10. Former user Account Deleted
    Issue 561 has been merged into this issue.
    

    Reported by helder.pereira.correia on 2015-04-18 20:45:08

  11. Former user Account Deleted
    I am using OpenSUSE 13.2 64 bit and use the SpeedCrunch 0.11
    (Qt 4.8.6).
    I triyed all suggestions in all comments above and can confirm nor one of them is working
    whth this version.
    
    My first suggestion for improvement to make possible to write comments in the calculation
    is from 2009.
    It is very sad that since 6 years this very needed functionality is not done as needed.
    

    Reported by kiv@mail.orbitel.bg on 2015-04-19 16:14:30

  12. Former user Account Deleted
    If the milestone for solution to make annotations in the calculations is SpeedCrunch
    0.11, can some one confirm it is offficially possible?
    If is made possible, please describe how to make it working? 
    

    Reported by kiv@mail.orbitel.bg on 2015-04-19 16:18:54

  13. Former user Account Deleted
    @klv: see comment 11. It is valid since version 0.11.
    

    Reported by helder.pereira.correia on 2015-04-19 16:35:47

  14. Former user Account Deleted
    Sorry to write more comments, but I found out my explanation in my notes above is not
    clear. So I am writting here to explain what I mean.
    
    Oct, 2013 there is a commit to make "any text following a '?' (question mark character,
    inclusive) to be ignored for evaluation purposes. It is kept visible in the result
    display and history and has its own highlighting color."
    It is very good to have this possibility, but I thing it is not enough for status Fixed.
    Unfortunately it is working only after some calculation expression and does not work
    on a new (empty) row. This way this solution even is working but does not left enough
    place for longer texts. Especially if more rows of text will be needed.
    
    My suggestion is to remove the status Fixed until will be possible to put a '?' (question
    mark character), and write there a text without any calculation expressions and after
    hitting Enter, to have a new row with this '?' followed by the text needed.
    This way we may write multirow comments.
    My expectation is that just after it, this issue may be considered fully solved and
    then can be marked as Fixed.
    

    Reported by kiv@mail.orbitel.bg on 2015-04-19 16:36:27

  15. Former user Account Deleted
    This issue is absolutely "Fixed". It was about "Support(ing) comments in expressions".
    I think you have a point, but it belongs in a new feature request. Please go ahead
    and file it if it's a feature you find very useful (preferably with use case descriptions).
    Thanks for the feedback.
    

    Reported by helder.pereira.correia on 2015-04-19 16:41:13

  16. Former user Account Deleted
    Sorry Helder
    
    The English is not my mother Language and may be I was not clear in writting my comment
    #16. 
    My idea was not to offend the developers, but some how help by suggesting some thing
    useful. Unfortunately I got tired to wait all long years to have finally 1/2 of the
    feature I suggested back in 2009. Please see  'Issue 297: Make possible to input lines
    with comments'. So I will not suggest same thing again. I am very thankful for the
    availability of SpeedCrunch as free software and highly appreciate your personal efforts
    and the efforts of the team. You are developing you can decide to reject my suggestion.
    I have nothing to say additionally.
    
    With best regards,
    

    Reported by kiv@mail.orbitel.bg on 2015-04-19 19:14:16

  17. Former user Account Deleted
    I marked issue 297 as duplicate of this one in 2009! Why haven't you called me to attention
    that they weren't the same thing? :)
    

    Reported by helder.pereira.correia on 2015-04-20 14:02:26

  18. Log in to comment