By default, when pasdoc generates the documentation, it shows items in the same order as they were declared in your source files. That's because programmers usually write declarations of things in a sensible order, grouping similar things together and such, so preserving this order in the documentation makes sense.

However, if you want, pasdoc can sort items when generating documentation, i.e. always show them in alphabetical order. This is controlled by --sort CommandLine option. As an argument, this options takes the list of things that should be sorted in the final documentation (separated by commas):

Example: before 2005-05-25, it was hardcoded in pasdoc what things to sort (and what not). To get this behavior, run pasdoc like this:

pasdoc --sort=functions,record-fields,non-record-fields,methods,properties ...

Note that there is no way to control sorting of some index-like pages, like the listings of all units and all identifiers in HtmlOutput. Such listings are always presented in alphabetical order, because there is no "natural" order for these things.

Notes about some "unsafe" sortings (that you generally shouldn't use, because in some (rare) cases they can confuse human reading generated documentation):

Sorting of other items is generally "safe" and is a matter of personal preference (and coding style), i.e. do you prefer identifiers to be presented always alphabetically or in the order they were declared.

SortOption (last edited 2007-10-28 22:57:14 by localhost)