Comment expressions are a special kind of comment retained for backward compatibility. Unlike ordinary comments, they are executable. Their format is:
js
#>exp(attr1: value1, attr2: value2, ...)
Here, exp is the expression type. The parentheses contain optional attributes. Many comment expressions must be followed by #>pop to end their scope, which runs from the line where the expression appears to the next #>pop.
If your UML uses features not in V2, wrap content in this so older clients can be prompted to upgrade. In V1, comment expressions are ignored; #if-no-v2 effectively ignores its block.
Comment Expressions
Comment expressions are a special kind of comment retained for backward compatibility. Unlike ordinary comments, they are executable. Their format is:
Here,
expis the expression type. The parentheses contain optional attributes. Many comment expressions must be followed by#>popto end their scope, which runs from the line where the expression appears to the next#>pop.End
#>popEnds the scope of the previous comment expression.
Rotate
#>rotangle(required): angle in radianscx,cy(required): center x and yTranslate
#>trdx(optional, default 0): horizontal offsetdy(optional, default 0): vertical offsetAlpha
#>alphaa(optional, default 0): opacity in [0,1]; 0 transparent, 1 opaqueMatrix
#>mat4×4 matrix entries (default 0). Used for scale, translate, rotate, etc.
Conditional
#>ifetc. condition: any expression; 0 is false, non-zero is true. Use#>fito end, not#>pop.Legacy compatibility
#>if-no-v2If your UML uses features not in V2, wrap content in this so older clients can be prompted to upgrade. In V1, comment expressions are ignored;
#if-no-v2effectively ignores its block.