ParamReturnsRaisesTag

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

PasDoc supports three tags for describing functions: @param, @returns and @raises.

  • @param marks the description of a function’s parameter

  • @returns marks the description of a function’s result value

  • @raises marks the description of an exception raised inside a function

Examples:

{ Do something with name and value.
  @param(Name is a string with the item's name)
  @param(Value is a string with the item's value)
  @returns(@true on success, @false otherwise)
  @raises(EUnknownItem if the name can not be found) }
function DoSomething(const Name: string; const Value: string): boolean;

Note that PasDoc (currently!) does not check whether the parameter names in the description match those of the function. But please don’t depend on it — a future version may check it.

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.