MemberValueTag

Michalis Kamburelis edited this page Jan 8, 2017 · 6 revisions

This page describes @member and @value tags. Overall, their intention is similiar: they allow you to specify a description for some item (structure member or enumerated value) as part of the description of an "enclosing" item (structure type or enumerated type). This is a matter of preference whether you use these tags, because they don’t allow to express anything new, but they allow to express it in somewhat more terse way.

@member tag

The @member tag can be used within the description of a structure (class, record, interface or object) to specify the description for a particular member (field, property, method) of this structure. Example:

type
  { @member MyField Description for MyField field.
    @member MyMethod Description for MyMethod method. }
  TMyClass = class
    MyField: Integer;
    procedure MyMethod;
  end;

This is equivalent to

type
  TMyClass = class
    { Description for MyField field. }
    MyField: Integer;
    { Description for MyMethod method. }
    procedure MyMethod;
  end;

@value tag

The @value tag can be used within the description of an enumerated type to specify the description for a particular value of this type. Example:

type
  { @value meOne Description for meOne value.
    @value meTwo Description for meTwo value. }
  TMyEnum = (meOne, meTwo);

This is equivalent to

type
  TMyEnum = (
    { Description for meOne value. } meOne,
    { Description for meTwo value. } meTwo);

More examples

For more examples and tests of these tags see test unit ok_value_member_tags.pas and html output for this test unit.

PasDoc, documentation generator for Pascal:
Features:
Supported Tags:
Command Line:
Development:
Developers pages:
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.