Programming language Chora: Comments

With comments you can leave additional inline documentation within the source code of a method. When processing the source code, the Chora compiler simply ignores all text passages recognized as comments. The comments have thus no real effect on the function of your application. The syntax of Chora comments is similar to the of other programming languages like C, C++, Java or JavaScript.

Line comment

The single line comment starts with a pair of slash signs // and is valid until the end of the text line. Following example demonstrates the usage of single line comments:

// Connect the onExitMenu slot method to the menu. This method is invoked, when the user // has decided to close the menu. menu.OnExitMenu = onExitMenu;

Block comment

The block comment starts with the sign sequence /* and is valid until the sequence */ occurs within the text. Following example demonstrates the usage of block line comments:

/* Connect the onExitMenu slot method to the menu. This method is invoked, when the user has decided to close the menu. */ menu.OnExitMenu = onExitMenu;

Nesting of block comments is not supported by Chora.

Description attribute

Besides the inline comments you have also the possibility to leave optional description text for most members within your project. For this purpose the members provide an attribute Description.

This description is used by Embedded Wizard Studio to provide you information about the project member when you select it within Inspector. Additionally with the available description information Embedded Wizard Studio is able to generate an HTML documentation file describing in detail your project structure and all dependencies between the project members.

Annotation members

Besides the inline comments you can also add an Annotation legend or Annotation group to leave notes within the implementation of your components, you consider important for another developers in your team or for the customer of your project.