HelpF`: usageF for ::usage generation example

Gallery
Tutorial
Click on the image to view it full size

Note that the usageF function can be used during initial package loading, because it uses only the help Rules for each provided '$arg$' and '$opt$' help holder or (preferred) an AOR Map to generate the signature(s) via the sigsFromArgsOpts function. Compare this with the sigsF function, which uses ExpressionTree parsing of DownValues, which might not be loaded by the time ::usage Strings need to be generated. One slight disadvantage of using help Rules is that it relies on their correct provision for consistency, but the Webel libraries also have functions for performing cross-checks once packages are fully loaded.

Packages that import the Webel HelpF` package - but not MTools and the Webel HelpM` package - should use the usageF function for ::usage String generation rather than the lower-level docF and docV functions (with direct '$doc$' Strings). For functions of any complexity and/or where argument and options sequences are shared between functions, use of an AOR Map (Arguments, Options, Rules) Association via the '$opt$aor' option for the usageF function is recommended (rather than "manually" creating help Rule Associations from 'rule$arg$' or 'rule$opt$' help Rules).
Up next
Notes
Snippets (quotes/extracts)
Visit also
Visit also (backlinks)
Related slides (includes other tutorials)
Related slides (backlinks, includes other tutorials)