// Lines starting with `#` contain structured documentation in Markdown format.
# Adds two integers.
// Documenting parameters of the function
# + x - an integer
# + y - another integer
// Documenting return parameter of the function
# + return - the sum of `x` and `y`
public function add(int x, int y)
returns int {
return x + y;
}
DocumentationAnnotations would be inconvenient for specifying structured documentation. Ballerina-flavored Markdown (BFM) is an additional convention on top of Markdown, which makes it more convenient for documenting Ballerina code. |
# Adds two integers.
Lines starting with #
contain structured documentation in Markdown format.
# + x - an integer
# + y - another integer
Documenting parameters of the function
# + return - the sum of `x` and `y`
public function add(int x, int y)
returns int {
Documenting return parameter of the function
return x + y;
}
bal run documentation.bal