Commenting is when you write a little note in the source code of your program so that other people can understand your code. It is considered good programming practice. The haXe compiler ignores comments and it is meant only for programmers. There is a specific syntax in haXe for commenting. They are of two types -

Line Commenting


This is used to explain the function of a single line. It should be written only in one line. It is preceded by //.
Here is some sample code -
class Hello
{
 
  static main()
  {
    trace("Hello"); // this is a comment
  }
 
}
You can write anything you want after the //.


Block Commenting




This is used to explain the function of a multiple line. It can run into many lines. It is preceded by /* and ended with a */.

Here is a sample code -

class Hello
{
 
  static main()
  {
    trace("Hello");
    /* this is a
    block comment
    */
  }
 
}

You can write anything in between the /* and */.