CCMT ($69us)

CDOC or CCMT generate, or update, function comment-block "headers" at the start of each function within user 'C' or 'C++' programs. They document the callers of the function, the functions it calls, and the Local/Global/Parameters used.

For our simple example program "EXAMPLE.C":

[return to HomePage Contents] [backup to CCMT]

Function Comment Block headers

Function COMMENT-BLOCK (of USERs/CALLS and LOCALs/GLOBALs)
**********************************************************
-------------------------------------------------------------------------------
FUNCT: main     START:     6 EXAMPLE.C
CALLS: printf   fahren   prt_line exit
LOCAL: c_temp   count    f_temp
-------------------------------------------------------------------------------
FUNCT: fahren   START:     1 EXAMPLE1.C
USERS: main
DEFIN: factor_1
GLOBL: factor_2
PARAM: c
LOCAL: f
-------------------------------------------------------------------------------
FUNCT: prt_line START:    15 EXAMPLE1.C
USERS: main
CALLS: printf
PARAM: c        f
-------------------------------------------------------------------------------

This shows that function "prt_line" begins at line 15 of file "EXAMPLE.C", referenced by "main", and calls "printf". "prt_line" uses no GLOBAL or LOCAL variables (otherwise appropriate lines would be generated), and receives/uses two PARAMeters "c" and "f".

Users may independently enable or suppress either the function caller/called information or the identifier local/global/paramater information (also local/parameter information may be suppressed to just show globals).

[return to HomePage Contents] [backup to CCMT]

Comment Block Insertion/Update to self-document code

The first pass of CDOC or CCMT generates a comment-block "header" for every function. An optional second pass will insert the comment block for each function just before its comments/code begins. Note that this must be a two (2) pass process. Pass-1 generates the function comment-blocks for each function, and pass-2 will insert these comment-blocks into the appropriate place in the source programs (you could not generate/insert them during pass-1 since as you encounter a particular function you do not know which subsequent functions will reference it).

During the second pass comment block insertion, CDOC will detect any of its existing (old) comment blocks and remove them before inserting the current (new) comment blocks. This is a simple and automated way to keep your code documentation up-to-date!

[return to HomePage Contents] [backup to CCMT]

Comment Block Extraction of "Programmers Notebook"

An optional third pass of CDOC or CCMT will extract the comment-blocks for each function, as well as user comments and the function definition source code line, one function per page.

This produces a convenient "Programmers Notebook" of all the functions in the source code.

[return to HomePage Contents] [backup to CCMT]
[next document CREF]

Author:

SoftWare BlackSmiths Inc, 6064 St Ives Way, Mississauga ON, Canada L5N-4M1 WWW = http://www.swbs.com eMail = email@swbs.com Voice/Fax = (905)-858-4466

You are the visitor to this page. We just reset our hit-counter aug2001

MAIN WEBPAGE INDEX: (back to the main index).