You are here: More Information > Technical Reference
Special Tasks
Technical Reference
> Sample Source Code
Close
Doc-O-Matic 10
Sample Source Code

In the following example you see how well documented functions look like in your source code. Notice that no tags or other not readable characters are necessary for Doc-O-Matic to understand your comments. 

Assume you have the StringList class and you want to document its member function Find. You describe the function in the implementation location. You want to have a See Also section which links to the corresponding methods IndexOf and Sort and the property Sorted. Assume you want to describe all parameters and the return value. You want to include a brief description of the purpose of the method on the topic page.

// Summary: // Locates a string in the string list. // Arguments: // S - The string to be located. // Index - The index of S is returned through this parameter if it // was found. It is not guaranteed that Index is not // modified, even if the string is not found. // Return Value: // TRUE if the string could be found in the string list, // FALSE otherwise. // Description: // Use the find function to locate a string S in the string list. // Only use this function if the string list is sorted, to locate // a string in a non-sorted string list use IndexOf. // See Also: // IndexOf, Sort, Sorted bool StringList::Find(const char *S, int &Index) { [...] } function StringList.Find(const S: string; var Index: Integer): Boolean; begin [...] end;

Sections, Section Appearance, Section Format

Copyright © 2000-2020 toolsfactory software inc. All rights reserved.