Commenting (Code)

Ninox Profile

I needed to add a comment to document something important ... I went through ALL the posts I've saved re: commenting (in code) and initially none of them worked (my fault because I didn't put lines in the right order <*>), with that said, I still had to stop, look it up again, fiddle around with it, so  ....   

===

can we PLEASE have good ol' commenting?!

//please

//pretty please ... 

//would be forever grateful.

//Karen

Ninox Profile

Sadly the only way to do this is by using

let text := "notes"

Ninox Profile

Agus, You don't need to set a comment to a variable. You only need to put the comment between double quotes and it can span multiple lines. You can add // or /* */, but it isn't necessary.

Ninox Profile

Thanks Agus and Sean ....

"Coder is grumbling" 

should be ... 

//Coder is grumbling//

---

[and don't forget the ";" when using multiple lines of comments.]

--> Stupid question alert: I wonder why they (Ninox) can't just make it that way? (I'm sure it's a complicated answer ... just saying. :-)) Karen

Ninox Profile

.... would be nice to be able to EDIT comments too. 

**In case anybody else looks at the post, it could be perceived that I'm saying //coder is grumbling // IS the correct way, because I said: "should be". 

I should have said "wished it could be" ...**

--

Just thought I'd clarify that :-) ke

Ninox Profile

Karen, I thought I needed to put a semicolon at the end of each line of a multiline comment too, but it's not necessary. I put this in a formula field and get the result of the arithmetic...

 

"This is a comment on line 1

 

This is a comment on line 5";
2 + 2

 

I would like to be able to use standard commenting as well because if you want to comment out a section of code that already has double quotes you have to double-up on those quotes. Sometimes it is more practical to copy and paste the code to a text editor.

 

Regarding your question about why they can't just make it that way, it's not just the editor it's also the lexer and parser. I don't know if they developed the editor from scratch or are using an open-source text editor with most of the good stuff turned off. The code editor doesn't have basic find/replace which causes me to copy/paste to TextEdit. I could go on about how changes in code can wipe out all of a formula somewhere else and the icy feeling I get when I see the red rectangle around the formula text box, but these are things I have learned to live with.

Ninox Profile

Thanks Sean! I figured it wasn't a just a simple 'uncomplicated' matter.  ... and I appreciate your commenting 'fix' (which I'll make note of :-) I was just annoyed because things were moving along (i.e. I wasn't getting stuck on anything) and all I wanted to do was add a simple comment line so I'd remember 'why' I did something the way I did. Then, I needed to stop, look for the comment format note I have, ... etc.

----

I now have that note 'pinned', starred, tagged  ... ). I was also working w/CSS for a website design that same day, where I could merrily comment away (to keep things neat). 

//Sigh// ke

Reply