list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

Requirements

Requirements allow for the same comment to appear in different sections of the code without typing out the comment multiple times.

They consist of two components: the requirement definition, which contains the comment statement to be added, and the requirement implementation, which specifies where the requirement statement should be added.

Multiple requirements can be called through an implementsReq statement.


Example

req R01 {
  This is a comment we would like to add
  multiple times in different locations.

  The identifier used for this requirement is
  R01.
}

req R02 {
  This is a second requirement statement.
}

implementsReq R01;
class Example {
  implementsReq R02;
  var1;
  var2; implementsReq R01, R02;
}
      

Load the above code into UmpleOnline