0

Do functions support the use of comments?

Do functions support the use of commetns within the code?  

Something like /*  or -- .. or anything ... ??

Might be helpful. 

7replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi, this feature is on the change request list.

    Though, you might use a workaround:

    let comment := "put comment here";

    Like
    • Mconneen
    • Mconneen
    • 4 yrs ago
    • Reported - view

    Thanks Alex.. I was trolling the forum and found a thread that indicated the following works.. I just tested it .. and it does.. but still seems a more strutured "comment" syntax is in order.. :) 

    "This is a comment";

    let foo := 0;

    Like
  • Yes we need an easy comment function such as // instead of just assigning a meaningless variable as a workaround...

    Like
  • Apparently just the quotes are needed, the "let" and variable name is not needed. So, you can insert comments using this;

    "---INSERT COMMENT HERE---";

    Like
  • Definitely agree re: // or /* for comments!! :-) 

    Like
  • We can also comment several lines like:

    "
    comment line 1
    comment line 2
    comment line 3
    " ;

    But //, or ///, or /* are a must.

    When debugging if we need to block more than a few lines of code, the above solution does not work if we already have comments (double quotes) inside de code block .

    So having:

    /// for starting a multiline code block comment, and

    /// for ending 

    Woub be a great help.

    Like
    • Sean
    • Sean
    • 2 yrs ago
    • Reported - view

    @Jose, Thanks for pointing out multiline commenting between a single pair of double quotes. I had been using a pair of double quotes for each line 😝. I know it's not perfect, but you can add /* right after the first double quote and */ right before the second double quote. I agree about wanting to block out some code that has quotes in it. When I see how many double quotes I have to double-up, I have to decide whether to cut and paste the code block into a text editor or double quote.

    Like
Like Follow
  • 2 yrs agoLast active
  • 7Replies
  • 1880Views