Skip to content

Comments and tags

ESL

ESL allows for the definition of two types of comments: code comments and annotation comments. Comments are used to explain the code and can be added using the # syntax. These are not part of the specification and are generally used to provide additional context or clarification. Annotation comments are linked to specific elements in the model, such as components, variables, and requirements, and can be added using the #< syntax. Tags are used to mark specific parts of the code and can be added using the #@ syntax. The tags can be used to categorize the elements.

define component CentrifugalPump
# A comment for the CentrifugalPump, which will not be mapped to SysML

  parameters
    torque is a mechanical-energy-flow #< Annotation comment for parameter
    water-flow is a liquid-material-flow
    length is a spatial-measure property

    comment
    x #< Annotation comment block for longer text
    #< @MadebyX

SysML

Element groups and Notes

SysML allows for the definition of notes and elementgroups. Element groups are used to group model elements together and can be added using the element group symbol. Similarly to a tag, adding an element to an elementgroup does not change its semantics. The element group symbol is represented by a rectangle with a solid line. The element group can be linked to a model element using a dashed line.

Notes are used to provide additional information about a model element and can be added using the note symbol. The note symbol is represented by a rectangle with a folded corner. The note can be linked to a model element using a dashed line.

Warning

Code comments in ESL are not part of the specification, and are thus not mapped to SysML. Never add important information in the code comments!

Next!

Press next (or N on your keyboard) to head over to the next page! P is for Previous.