Comments are used to explain various code parts. Fore uses single line (//...), multiline ({...}), and XML comments (/// <summary>.../// </summary>). Comments do not affect the meaning of the program and are not used by compiler.
XML comments can be used for documenting various code blocks, for example, procedures/functions/classes, and so on. Along with the <summary> tag, one can specify any other tags, for example, HTML markup tags or custom tags that will allow for getting an XML structure of comment in the required format. Values of comments can be obtained in application code using the XMLDocumentation property of the IForeClass, IForeProperty, IForeSub interfaces.
// example of single comment
{
example of
multiline
comment
}
{ Multiline comment located in one line }
/// <summary>
/// Check work of the Mod operation that returns mod of two numbers division
/// </summary>
/// <param name="a">Dividend</param>
/// <param name="b">Divisor</param>
/// <returns>Mod of division</returns>
Function TestMod(a: Double; b: Double): Double;
Begin
Return a Mod b;
End Function TestMod;
See also: