Official Content

Comments can be used to document what a program does or what a specific block of lines of code do.

At its core, a comment is text that is put somewhere for a human to read, that the computer ignores. You can include them anywhere in a GeneXus Object (source sections) without affecting the generated code.

There are the following  types of comments in GeneXus:

  • Single line comments: type a couple of forward slashes followed by the comment. You can use this technique to add a comment on its own line or to add a comment after the code on a line.
&i += 1 // for single line comments
  • Multiple line comments: you may want to comment out an entire block of code statements; type a /* to get started the commented block and end it with */
/* for 
multi line 
comments */

As shortcut, you can use Ctrl+Q, Ctrl+Shift+Q to Comment or Uncomment the selected lines of text.

Comments Ctrl+Q







Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant