You are here: More Information > Special Tasks
Special Tasks
Technical Reference
> File and Parsing Options > Adding Other File Types > Generic Source Files > Extracting Comments
Close
Doc-O-Matic 10
Example Use Connected Comments Only

Assume you have a VB source file and you select the Use connected comments only check box:

'@@Encrypt 'Summary: ' Encryption function 'Description: ' This function "encrypts" string using ' very simple ascii code shifting. It ' supplied as a demo only, do not use it ' to secure vital information. 'Parameters: ' Plain - the string that will be "encrypted". 'Returns: ' The "encrypted" string. Public Function Encrypt(ByVal Plain As String) Dim Letter As String ' go through all characters For I = 1 To Len(Plain) ' get the letter Letter = Mid$(Plain, I, 1) ' and "encrypt" it Mid$(Plain, I, 1) = Chr(Asc(Letter) + 1) Next I ' return the result Encrypt = Plain End Function

After processing the file, Doc-O-Matic uses the following:

@@Encrypt Summary: Encryption function Description: This function "encrypts" string using very simple ascii code shifting. It supplied as a demo only, do not use it to secure vital information. Parameters: Plain - the string that will be "encrypted". Returns: The "encrypted" string.

This is the content of the first comment block that follows the @@Encrypt token. Doc-O-Matic ignores source lines and comment lines that are set off from the first block.

Note: The @@Encrypt token instructs Doc-O-Matic that a new topic with ID Encrypt starts at this position in the file.

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