6

Is it possible to document unit purpose in Delphi using <summary> XMLDoc tag? How?

I've tried put summary both before unit:

/// <summary> Unit purpose: test </summary>
unit Test;

and after:

unit Test;
/// <summary> Unit purpose: test </summary>

Both approaches gives nothing. Checked by hovering over the unit name in the other unit. At the same time hovering works for other identifiers in the same units

Serhii Kheilyk
  • 921
  • 8
  • 23

1 Answers1

2

According to Embarcadero's documentation:

XML Documentation Comments

You can use the following elements in XML DOC comments:

<summary>

A summary of the target function or class

So no, it does not appear that you can apply a <summary> to the unit as a whole.

Remy Lebeau
  • 454,445
  • 28
  • 366
  • 620
  • 1
    Indeed, it also works for properties and for types which aren't classes, like records, enumerations, simple types (like `type MyInt = type Integer`) etc., so this remark in the documentation is not quite accurate. However, if Serhii has tried to put the XML comment before a unit and it didn't work, this very likely means that the answer to this question is "No" (at least in the OP's version of Delphi). So really, this Q is more of a Delphi feature request aimed at Embarcadero! :) – Andreas Rejbrand Nov 15 '19 at 07:35