Writing Expression Comments
Expressions can become large and complex over time. Although the purpose of an expression may be obvious to whoever originally wrote it, it may not be immediately obvious to someone else attempting to review or edit the expression.
The Mercato Expression Engine includes a facility for adding lines of human-readable text - also known as Comments - to expression code. These comments allow KnowledgeKube users to leave clear instructions and pointers for the benefit of anyone reading the expression.
Implementation:
- Open the Expression Editor for the expression.
- Place the cursor on the row where the comment should be added. You can turn multiple lines into a comment by selecting them all.
- Right-click and select Advanced > Comment Selection.
- End each comment line with a semicolon.
Everything between the forward slashes and the semicolon will be disregarded by the expression parser, meaning the comment author is free to type as much text as they need to get their point across. This can also be used to deactivate specific parts of an expression without needing to delete anything.
If you want to create more than one distinct line of comments, you can separate the text using a carriage return; however, you must apply comment formatting to each individual line.
You can use expression comments to create Task Tokens, which you can use to highlight required work or incomplete features.