C C T B H P N

Note #2 - Package Structure Matters!

A package is a small piece of code that obeys the Single Responsibility Principle (SRP): it is focused on a single activity. In order to test and extend packages, designers need to understand their operations, and so spend a lot of time reading their text. To support this study, we will structure our packages so that:
File: Package_Name.cs
Manual Page goes here

Maintenance Page goes here

Declarations with inline implementations go here

#if(TEST_Package_Name)
static void Main(string[] args)
{
  // Test code goes here
}
          

C# Package Structure

Example:

The tokenizer package, Toker.cs, from the Parser Demo is a good example of a well structured package. Here is a sample output fragment from the tokenizer.

Conclusions for: Package Structure is Important!

A published package contains:
  1. A package file with: prologue, manual info, maintenance info, service definitions, and construction test stub with a compilation switch.
  2. Each of the member functions is preceeded by a single comment line that describes its responsibility in a few words.
All of the reusable modules provided for your use in our website follow this format, as your submitted code must, as well. Demonstration code, intended to illustrate some idea, but not intended for reuse will follow a much simpler format.