A.3   Tcl Module Layout

A module is any unit of code that resides in a single Tcl file. The conventions in this section define the standard module heading that must come at the beginning of every Tcl module following the standard file heading. The module heading consists of the blocks described below; the blocks are separated by one or more blank lines.

After the modification history and before the first function or executable code of the module, the following sections are included in the following order, if appropriate:

The format of these blocks is shown in the following example (which also includes the Tcl version of the file heading):

Example A-2:  Tcl File and Module Headings

# Browser.tcl - Browser Tcl implementation file 
# 
# Copyright 1994-1995 Wind River Systems, Inc. 
# 
# modification history 
# -------------------- 
# 02b,30oct95,jco  added About menu and source browser.tcl in .wind. 
# 02a,02sep95,pad  fixed communications loss with license daemon (SPR #1234). 
# 01c,05mar95,jcf  upgraded spy dialog 
# 01b,08feb95,p_m  take care of loadFlags in wtxObjModuleInfoGet. 
# 01a,06dec94,c_s  written. 
#  
# DESCRIPTION 
# This module is the Tcl code for the browser. It creates the main window and 
# initializes the objects in it, such as the task list and memory charts. 
# 
# RESOURCE FILES 
# wpwr/host/resource/tcl/shelbrws.tcl 
# wpwr/host/resource/tcl/app-config/Browser/*.tcl 
# ... 
#*/ 
 
# globals 
 
set browserUpdate         0         ;# no auto update by default