3

A new way to comment out code in the console

With my friend Jan, we discovered a new way to add comments in the Ninox console. Simply add /* before and after the text you want to comment out :

var a := {lastName : "tur"};
/* var a := {firstName: "jacques"}; /*
a;

Normally, you can use quotation marks (") or dashes (---). But in this case, it's not possible, because the code to be commented out also contains quotation marks and braces, which would be interpreted by the dashes (---).

 

Quotation marks don't work :

 

The dashes neither :

 

The new notation using /* works well :

 
Unfortunately, this notation cannot be used in formulas because when it is used, the code that is commented out disappears upon saving 😟.

This way of commenting out code remains usable in the console and is very convenient when quotation marks (") or dashes (---) cannot be used ☺️.

Furthermore, it is possible to comment out code within a line, which is not otherwise possible. In the example below, only the word "first" is removed from the code :

 

 

1 reply

null
    • NYNNA
    • Louis_Cornacchia
    • 1 yr ago
    • Reported - view

    Nice!  Thank you. 

    Simple - but start and end are the same - adds a bit of difficulty in finding multi-line comment delimiters.

    You can add this method to your list also:

     

    #{// ***************** OUTPUT SOAP NOTE*********************}#;

    #{// }#;

Content aside

  • 3 Likes
  • 1 yr agoLast active
  • 1Replies
  • 324Views
  • 2 Following