A.1   Introduction

This document defines the Wind River Systems standard for all Tcl code and for the accompanying documentation included in source code. The conventions are intended, in part, to encourage higher quality code; every source module is required to have certain essential documentation, and the code and documentation is required to be in a format that is readable and accessible.

The conventions are also intended to provide a level of uniformity in the code produced by different programmers. Uniformity allows programmers to work on code written by others with less overhead in adjusting to stylistic differences. Also it allows automated processing of the source; tools can be written to generate reference entries, module summaries, change reports, and so on.

The conventions described here are grouped as follows:

  • File Heading.  
    Regardless of the programming language, a single convention specifies a heading at the top of every source file.

  • Tcl Coding Conventions.  
    The language-specific conventions are roughly parallel to those for C and C++, but must differ to account for the particulars of each programming language. These conventions are divided into the following categories:

    • Module Layout
    • Procedure Layout
    • Code outside of procedure
    • Code Layout
    • Naming Conventions