Index
 Code Metric Help Index

What is Code Metric?

Using Code Metric

Read this!

Line and comment counting

Code formatting

Using the add-in program

Using the stand alone program

License agreement

How to ...

Register Code Metric

Format code

Set default formatting

Print line and comment summary

Commands

File menu

View menu

Format menu

Window menu

Help menu


What is Code Metric?

Code Metric provides two main services to the programmer.   First it provides a count of lines and a count of comments contained in a project.   The algorithm used to count these items is described here.  Second it provides a powerful code formatting utility that may be customized to consistently format code in a variety of manners.

Code Metric is designed to be used with Visual C++ version 6.0.  It has not been tested with other versions.

The program is provided in two different versions, a conventional stand-alone program and a Visual C++ add in.  The stand-alone program uses an MDI structure.  The user may open any existing Visual C++ workspace.  The add-in program provides an additional toolbar for Visual C++, and operates on the currently open workspace.  Both programs will display the line and comment count for the workspace, but will not modify the workspace itself.  Both allow the user to perform formatting on individual files, projects or the entire workspace at the same time.

Both programs use the same formatting algorithm, and share the same registry area for user preferences.  So if you set your formatting preferences using one program it is automatically modified for the other program as well.

In addition to the file, project and workspace formatting described above, the add-in program provides a toolbar that allows the user to format the file currently active in the Visual C++ editor.  When Code Metric is used in this way, the editor contents are changed but the modification is not saved to disk.  The file must be saved in the normal manner.


Read this!

Please be careful with Code Metric.  We have tested this product thoroughly.  We use Code Metric on our own code all the time.  We know of no cases where code metric will alter a program so that it behaves differently after Code Metric has operated on it.  However, we have not tested it on YOUR code.  We strongly urge you to make backups of all code before running Code Metric.  We also urge you to read the Disclaimer of Warranty on this page.

Code Metric is designed to be used with Visual C++ version 6.0.  It has not been tested with other versions.


Overview
Line and comment counting

A common requirement for programming is to determine the size of the program based on the number of lines contained in it.  While not an absolute measure of code complexity, it at least provides a reasonable estimate of relative complexity.  Closely coupled with this is the number of comments provided by the programmer.  Code Metric automatically summarizes these two values for each project contained in the workspace.

The algorithm for counting lines and comments is as follows:

1.	Every line counts as a code line.  Thus comment lines are included in the line count.  If you had a piece of code with 100 comment lines and only 10 actual code lines, the line count would be 110.

2.	Every comment is counted, thus if you have two or more comments in a line, such as:

int iValue=function(3 /*comment for 3*/, 4 /*comment for 4*/) // final comment

this would count as 1 line and 3 comments.

The line and comment count is contained in a tree view that is part of the view window for the stand-alone program and part of the Project Analysisdialog for the add-in program.  A sample display is shown below:

Each project has a summary showing the line and comment count for the whole project.  When expanded, the tree shows all of the files associated with the project along with the line and comment count for that file.


Overview
Code formatting overview

There are a variety of ideas on the best way to format C and C++ code.  Some programmers prefer to attach the opening brace to the end of the line where the brace begins, like this:

int CClassName::MyFunction {

    int iValue = 1;

    for( int i = 1; i < 23; i ++ ) {

        iValue = i - 1;

        }

    }

Other programmers prefer to match the braces at the same level like this (this is the method I prefer):

int CClassName::MyFunction

{

    int iValue = 1;

    for( int i = 1; i < 23; i ++ )

    {

        iValue = i - 1;

    }

}

Still other programmers use a similar scheme but indent the braces like this:

int CClassName::MyFunction

    {

    int iValue = 1;

    for( int i = 1; i < 23; i ++ )

        {

        iValue = i - 1;

        }

    }

There are also issues involving white space (spaces and tabs) within the structure of the code.  In the examples above, there are spaces inside the parentheses and around the C++ operators.  Some programmers would prefer to compact the code (eliminating spaces) at the expense of some readability.  In this case, the example above would look like this:

int CClassName::MyFunction

    {

    int iValue=1;

    for(int i=1; i<23; i++)

        {

        iValue=i-1;

        }

    }

What is really important is to format your code consistently.  There is nothing harder to read than software that changes indenting and formatting styles.  Code Metric allows you to select from any combination of the above options and format your code consistently throughout your project.  In addition to the above options, Code Metric allows you to delete trailing white space (white space at the end of a line) and to convert between tab and space characters.


Toolbar
Using the add-in program

Before using the add-in program, the Visual C++ IDE must be customized to provide the add-in functions.  To do this perform the following steps:

1.	Start Visual C++.

2.	Go to the Visual C++ menu and choose “Customize” under the “Tools” menu.

3.	Click the “Add-ins and Macro Files” tab.

4.	Click “browse”.

5.	Browse to the folder where you installed Code Metric.

6.	Select the file “CMAddIn.dll” (you’ll have to change the default file type).

7.	Click “Open” on the browse window.

8.	Click “Close” on the customize window.

The toolbar provides access to twelve Code Metric functions.  Note that the buttons may be dragged to other toolbars using the standard Visual C++ toolbar customization procedures.  See the Visual C++ help file for more information on how to do this.

The default toolbar is shown below:

From left to right the functions provided by the toolbar are:

 Main project analysis dialog

 Full format

 Delete trailing white space

 Tabify

 Untabify

 Operator expand

 Operator contract

 Parentheses expand

 Parentheses contract

 Reindent

 Code Metric help

 Code Metric about dialog box


Project analysis dialog box
Project analysis dialog

The add-in project analysis dialog is shown below.  This dialog allows the add-in program to display the file line count and comment summary.  In addition it allows the user of the add-in program to set the default formatting styles by pressing the “Set style” button.

The formatting buttons tabifytabify, untabify, parentheses expand, parentheses contract, operator expand, operator contract, reindent, and full format operate in a manner similar to the add-in toolbar except that the dialog functions can operate on multiple files and projects at the same time.

Finally this button allows the add-in user to print the line and comment count report in the same manner as the stand alone program.


Full format

The full format performs a combination of all of the format options provided by Code Metric.  This includes tabifytabify, untabify, parentheses expand, parentheses contract, operator expand, operator contract, and reindent.  These operations are carried out as specified by the “Set Style” dialog box.  See how to set default formatting for more information.


Delete trailing whitespace

This option deletes white space between the last character and the end of each line.  This white space doesn’t do anything besides make the code take more disk space, and can be annoying during some editing operations.  White space includes spaces, tabs and line feeds.


Tabify

This command looks at the tab size field from the “Set Style” dialog box.  Any group of spaces of that size is replaced with a tab.


Untabify

This command looks at the tab size field from the “Set Style” dialog box.  All tabs are replaced with that many spaces.


Operator expand

This command will place spaces around all C and C++ operators.  These operators are:

<<=    >>=    ^=    &=    |=    <<    >>    +=    <=    >=    &&    ||    ++    --    !=    ==    -=    *=

/=    %=    ->    +    -    *    /    %    ^    !    =    <    >    ~    |    &    ,


Operator contract

This command will remove spaces around all C and C++ operators.  These operators are:

<<=    >>=    ^=    &=    |=    <<    >>    +=    <=    >=    &&    ||    ++    --    !=    ==    -=    *=

/=    %=    ->    +    -    *    /    %    ^    !    =    <    >    ~    |    &    ,


Parentheses expand

This option will insert spaces into the inside of all parentheses.  The means a space immediately to the right of open ‘(‘ parentheses, and to the left of close ‘)’ parentheses.  Brackets ‘[]’ and braces {} are not effected.


Parentheses contract

This option will remove spaces from the inside of all parentheses.  The means a space immediately to the right of open ‘(‘ parentheses, and to the left of close ‘)’ parentheses.  Brackets ‘[]’ and braces {} are not effected.


Reindent

This option reindents the code using the indenting rules you previously established using the format settingsdialog box.


Code Metric help

This option displays the help file for Code Metric.  (The file you are currently reading).


Nag screen
Code Metric about dialog box

The Code Metric dialog box is shown below.  If you haven’t registered Code Metric you’ve probably seen this a lot, because it also serves as our “nag screen”.  We feel bad about doing this, but we want to make Code Metric into a really useful programming tool.  In order to do this we need your support.  Please take a moment to register Code Metric.  It will help us to continue to support Code Metric, and will get rid of those annoying nag screens at the same time.


General tips
Using the stand alone program

The stand-alone program is a conventional MDI (Multiple Document Interface) program.  You can use it to open any Visual C++ 6.0 workspace file.  The workspace itself cannot be modified with the program, therefore there is no option for saving or changing the workspace itself.  When you open a workspace you get a view that looks like this:

One or more files can be selected with the mouse or keyboard.  If a project file is selected, it automatically causes formatting options to apply to all of the files underneath it.  In addition to the menu options, program options may be selected from the toolbar.


General tips
How to format code

Formatting code can be done with both the stand-alone and add-in program.  While the methods are different, the basic idea is the same.  Set the formatting optionsthe way you like.  Choose the files you want to operate on.  Then format.  Formatting may be done all at once with the “Full Format” option.  Or it may be done one item at a time using the other buttons and menu items.

Formatting from the stand-alone program

Formatting from the stand-alone program is done by selecting the files or projects to format.  The appropriate formatting option can then be used from either the menu or the toolbar.  These options will read all selected files, format them and then save them to disk.  Only files of type c,h,cpp and idl will be formatted.

Formatting from the add-in toolbar

Formatting from the add-in toolbar effects only the currently active file in the IDE (Integrated Debugging Environment).  The file is formatted but not saved to disk.

Formatting from the add-in project analysis dialog

Formatting from the add-in project analysis dialog is done by selecting the files or projects to format.  The appropriate formatting option can then be used from the buttons to the right of the tree control.  These options will read all selected files, format them and then save them to disk.  Only files of type c,h,cpp and idl will be formatted.


Default formatting
How to set default formatting

Default formatting is set from the Format Settingsdialog box.  This is available from the stand- alone program as a toolbar button and from the “Format Settings” menu item (under “Format”).  It is available from the add-in program’s main dialog box by pressing the “Format Settings” button.

Format settings are shared between the stand-alone program and the add-in program.  So if you make a change to one, you automatically change the other at the same time.


General tips
How to print the line and comment count

The stand-alone program has conventional print and print preview menu items, as well as a print button on the toolbar.  The add-in program has a “Print Report” button in its main dialog box.

In both cases, the printed report will contain a summary of each project with a total line and comment count and listing of each file contained underneath it.


Dialog box
The format settings dialog box

The format settings dialog box is a tabbed dialog box with five tabs (also called property pages).  These property pages are for setting tabs, open braces, closed braces, white spaceand misc.  In addition to the property pages, there is a preview window to give the user some idea as to the impact of his choices.  At any time after a setting is changed, the user may press the apply button to format and redisplay the sample code to match the current settings.  The dialog box, opened to the tab page is shown below.


Tabs page
The “Tabs” property page

The tabs property page has three options for automatic reindenting and full format processes.  These settings are “replace spaces with tabs”, “replace tabs with spaces” and “do not change”.  These options dictate what will happen when the user chooses either the reindent or full format settings.  The table below shows what will happen with the various options:

	Replace spaces with tabs	Replace tabs with spaces	Do not change
Reindent	All lines will be reindented with 1 tab per indent level.	All lines will be reindented with “indent size” spaces per indent level.	All correctly formatted tabbed indents will be unchanged.  Incorrectly indented lines will be changed to correct level using spaces.
Full format	Same as reindent plus all tabs will be replaced with spaces throughout the code.	Same as reindent plus all groups of “tab size” number of spaces will be replaced with tabs.	Same as reindent.

This property page also allows the user to specify the tab size and indent size.  The settings dialog open to this page is shown below.


Open brace page
The “Open Brace” property page

The open brace property page has two options related to indenting.  The open brace can either be put on a new line by itself or attached to the previous line.  If the open brace is on a new line it can either be indented or not indented.  Note that indenting has no function if the brace is on the same line as the code.  See the How to format codesection for more information on these options.


Close brace page
The “Close Brace” property page

The close brace property page has two options related to indenting.  The close brace can either be put on a new line by itself or attached to the previous line.  If the close brace is on a new line it can either be indented or not indented.  Note that indenting has no function if the brace is on the same line as the code.  See the How to format codesection for more information on these options.


White space page
The “White Space” property page

This page has three options.  These options determine how the full format command treats white space.  White space can be added or removed around operators, added or removed inside paragraphs, or left unchanged.  Trailing white space can either be scheduled for removal or left unchanged.


Misc. page
The “Misc” property page

This page has only one active function.  That determines whether or not the full format option performs the reindent function.  There are two planned options that will perform spell checks on comments and on text strings within the code.  These two options, along with several others will be implemented if there are a sufficient number of registrations to make Code Metric a worthwhile enterprise.  If you would like to see Code Metric improve, please register your copy.


Main menu
Menu commands

File menu

View menu

Format menu

Window menu

Help menu


File menu commands

The Code Metric file menu is designed to operate on Visual C++ version 6.0 workspaces.  It is designed to report information on the workspace and the files contained within

The File menu offers the following commands:

Open	Open a Visual C++ workspace.
Close	Closes an opened document.
Print	Prints a document.
Print Preview	Displays the document on the screen as it would appear printed.
Print Setup	Selects a printer and printer connection.
Recent Files	A list of recently opened Visual C++ workspaces.
Exit	Exits Code Metric.


File menu
View menu commands

The View menu offers the following commands:

Toolbar	Shows or hides the toolbar.
Status Bar	Shows or hides the status bar.


View menu
Window menu commands

The Window menu offers the following commands, which enable you to arrange multiple views of multiple documents in the application window:

Cascade	Arranges windows in an overlapped fashion.
Tile	Arranges windows in non-overlapped tiles.
Arrange Icons	Arranges icons of closed windows.
Window 1, 2, ...	Goes to specified window.


Help menu
Help menu commands

The Help menu offers the following commands, which provide you assistance with this application:

Help Topics	Offers you an index to topics on which you can get help.
About	Displays the version number of this application.


Format menu
Format menu commands

The Format menu offers the following commands; these provide almost all of Code Metric’s functionality.

Settings…	Allows the user to select how the “Full Format” task is performed. Calls the Settings Dialog.
Full Format	Performs a full format on all selected files and projects.
Delete Trailing Whitespace	Deletes trailing whitespace (spaces, tabs and line feeds) on all selected files and projects.
Tabify	Converts spaces to tabs in all selected files and projects.
Untabify	Converts tabs to spaces in all selected files and projects.
Operator Expand	Adds spaces around C++ operators.
Operator Contract	Removes spaces around C++ operators.
Parentheses Expand	Adds spaces inside parentheses.
Parentheses Contract	Removes spaces from inside parentheses.
Reindent	Performs reindent operation based on current settings.


Recent File List

This menu option shows a list of the four most recently accessed workspace files.  Click on one of them to open it.


File open command
 Open command (file menu)

Use this command to open an existing Visual C++ workspace in a new window.  You can open multiple workspaces at once.  Use the Window menu to switch among the multiple open documents.  See Window 1, 2, ... command.

Shortcuts

Toolbar:

Keys:	CTRL+O


File open dialog
File open dialog box

The following options allow you to specify which file to open:

File name

Type or select the filename you want to open.  This file should be a Visual C++ workspace file.

List files of type

You should only open Visual C++ workspace files that are almost always of type *.dsw.

Drives

Select the drive in which Code Metric stores the file that you want to open.

Directories

Select the directory in which Code Metric stores the file that you want to open.

Network...

Choose this button to connect to a network location, assigning it a new drive letter.


File close command
Close command (file menu)

Use this command to close the window containing the active Visual C++ workspace.

You can also close a document by using the Close icon on the document's window, as shown below:


Closing the program
Exit command (file menu)

Use this command to end your Code Metric session.  You can also use the Close command on the application Control menu.  Code Metric prompts you to save documents with unsaved changes.

Shortcuts

Mouse:	Double-click the application's Control menu button.

Keys:	ALT+F4


View toolbar command
Toolbar command (view menu)

Use this command to display and hide the Toolbar, which includes buttons for some of the most common commands in Code Metric, such as File Open.  A check mark appears next to the menu item when the Toolbar is displayed.

See Toolbar for help on using the toolbar.


Toolbar

The toolbar is displayed across the top of the application window, below the menu bar.  The toolbar provides quick mouse access to many tools used in Code Metric,

To hide or display the Toolbar, choose Toolbar from the View menu (ALT, V, T).

Commands available from the toolbar are:

   Open

   Print

   Full format

   Delete trailing white space

   Tabify

   Untabify

   Operator Expand

   Operator Contract

   Parentheses Expand

   Parentheses Contract

   Reindent

   Format settings

   Help

   About


View status bar command
Status bar command (view menu)

Use this command to display and hide the Status Bar, which describes the action to be executed by the selected menu item or depressed toolbar button, and keyboard latch state. A check mark appears next to the menu item when the Status Bar is displayed.

See Status Bar for help on using the status bar.


Status bar

The status bar is displayed at the bottom of the Code Metric window.  To display or hide the status bar, use the Status Bar command in the View menu.

The left area of the status bar describes actions of menu items as you use the arrow keys to navigate through menus.  This area similarly shows messages that describe the actions of toolbar buttons as you depress them, before releasing them.  If after viewing the description of the toolbar button command you wish not to execute the command, then release the mouse button while the pointer is off the toolbar button.

The right areas of the status bar indicate which of the following keys are latched down:

Indicator	Description

CAP	The Caps Lock key is latched down.

NUM	The Num Lock key is latched down.

SCRL	The Scroll Lock key is latched down.


Cascade
Cascade command (window menu)

Use this command to arrange multiple opened windows in an overlapped fashion.


Tile
Tile command (window menu)

Use this command to arrange multiple opened windows in a non-overlapped fashion.


Window arrange icons command

Use this command to arrange the icons for minimized windows at the bottom of the main window.  If there is an open document window at the bottom of the main window, then some or all of the icons may not be visible because they will be underneath this document window.


1,2,…
1, 2, ... command (window menu)

Code Metric displays a list of currently open document windows at the bottom of the Window menu.  A check mark appears in front of the document name of the active window.  Choose a document from this list to make its window active.


Index command (help menu)

Use this command to display the opening screen of Help.  From the opening screen, you can jump to step-by-step instructions for using Code Metric and various types of reference information.

Once you open Help, you can click the Contents button whenever you want to return to the opening screen.


Title bar

The title bar is located along the top of a window.  It contains the name of the application and document.

To move the window, drag the title bar.  Note: You can also move dialog boxes by dragging their title bars.

A title bar may contain the following elements:

Application Control-menu button

Document Control-menu button

Maximize button

Minimize button

Name of the application

Name of the document

Restore button


Scroll bars
Scroll bar

Code Metric documents may have a vertical scroll bar along the right hand edge of the document.  Use the scroll bar to display different parts of the workspace as needed.


Size
Size command (system menu)

Use this command to display a four-headed arrow so you can size the active window with the arrow keys.

After the pointer changes to the four-headed arrow:

1.	Press one of the DIRECTION keys (left, right, up, or down arrow key) to move the pointer to the border you want to move.

2.	Press a DIRECTION key to move the border.

3.	Press ENTER when the window is the size you want.

Note:  This command is unavailable if you maximize the window.

Shortcut

Mouse:	Drag the size bars at the corners or edges of the window.


Move
Move command (control menu)

Use this command to display a four-headed arrow so you can move the active window or dialog box with the arrow keys.

Note:  This command is unavailable if you maximize the window.

Shortcut

Keys:	CTRL+F7


Minimize
Minimize command (application control menu)

Use this command to reduce the Code Metric window to an icon.

Shortcut

Mouse:	Click the minimize icon [image] on the title bar.

Keys:	ALT+F9


Maximize
Maximize command (system menu)

Use this command to enlarge the active window to fill the available space.

Shortcut

Mouse:	Click the maximize icon [image] on the title bar; or double-click the title bar.

Keys:	CTRL+F10 enlarges a document window.


Next
Next window command (document control menu)

Use this command to switch to the next open document window.  Code Metric determines which window is next according to the order in which you opened the windows.

Shortcut

Keys:	CTRL+F6


Previous
Previous window command (document control menu)

Use this command to switch to the previous open document window.  Code Metric determines which window is previous according to the order in which you opened the windows.

Shortcut

Keys:	SHIFT+CTRL+F6


Close
Close command (control menus)

Use this command to close the active window or dialog box.

Double-clicking a Control-menu box is the same as choosing the Close command.

Note:  If you have multiple windows open for a single document, the Close command on the document Control menu closes only one window at a time.  You can close all windows at once with the Close command on the File menu.

Shortcuts

Keys: 	CTRL+F4 closes a document window

ALT+F4 closes the Code Metric window


Switch to
Restore command (control menu)

Use this command to return the active window to its size and position before you chose the Maximize or Minimize command.


Task list
Switch to command (application control menu)

Use this command to display a list of all open applications.  Use this "Task List" to switch to or close an application on the list.

Shortcut

Keys:	CTRL+ESC

Dialog box options

When you choose the Switch To command, you will be presented with a dialog box with the following options:

Task list

Select the application you want to switch to or close.

Switch to

Makes the selected application active.

End task

Closes the selected application.

Cancel

Closes the Task List box.

Cascade

Arranges open applications so they overlap and you can see each title bar.  This option does not affect applications reduced to icons.

Tile

Arranges open applications into windows that do not overlap.  This option does not affect applications reduced to icons.

Arrange icons

Arranges the icons of all minimized applications across the bottom of the screen.


General ordering information
Code Metric ordering information

CD and 3.5” floppy disk orders will be shipped by postal mail (air mail if you are overseas) within two business days after they are received. All prices include shipping.

Customer information is considered confidential and will not be shared or distributed to any third party.

All orders are subject to the Code Metric License Agreement.

Immediate online delivery

The easiest way to order is to use the secure credit card order form on the code metric web site www.codemetric.com.  Your password to unlock Code Metric (and get rid of those annoying nag screens) will be E-mailed to you within two business days.

Ordering by check

To order by check, send the order form and a check to OSS Software, 3276 S. White Rd., Box 192, San Jose, CA 95148 USA.  Payments must be in US dollars drawn on a US bank, or you can send international postal money orders in US dollars.  Click here to view a ready-to-print Order Form.

Credit card orders

You can place secure credit card orders on the Internet using the Order link on the Code Metric home page at http://www.codemetric.com.  For information on credit card ordering by phone, fax, e-mail, or postal mail, see the Credit Card Ordering form.

Purchase orders

Purchase orders (net 30 days) are accepted from government and accredited educational institutions and major corporations, provided that they are submitted on purchase order forms with a purchase order number.  Enclose the standard Code Metric order form with your purchase order, and send it to OSS Software, 3276 S. White Rd., Box 192, San Jose, CA 95148 USA.

Site licenses

A site license for Code Metric entitles an organization to receive one copy of the distribution package and to duplicate the distribution disk for the specified number of copies. See the table below for site license pricing. For higher quantity pricing, please send e-mail to sitesales@codemetric.com.

Pricing

Code Metric Single Copy	$39 each

2 to 20 computers:	$30 each

21 to 99 computers:	$25 each

100 to 499 computers:	$20 each

500 to 999 computers:	$15 each

Unlimited Site:	$15000

California residents please add 8.25% sales tax.

Prices guaranteed through August, 2000.


Copyright

Code Metric Copyright © 1999 by  OSS SOftware, Inc.

All rights reserved.

License agreement

You should carefully read the following terms and conditions before using this software.  Unless you have a different license agreement signed by OSS Software, Inc. your use of this software indicates your acceptance of this license agreement and warranty.

For information on distributing the evaluation version of Code Metric see the section titled Evaluation License.

Registered version

One registered copy of Code Metric may either be used by a single person who uses the software personally on one or more computers, or installed on a single workstation used nonsimultaneously by multiple people, but not both.

You may access the registered version of Code Metric through a network, provided that you have obtained individual licenses for the software covering all workstations that will access the software through the network.  For instance, if 8 different workstations will access Code Metric on the network, each workstation must have its own Code Metric license, regardless of whether they use Code Metric at different times or concurrently.

Governing law

This agreement shall be governed by the laws of the State of California.

Disclaimer of warranty

THIS SOFTWARE AND THE ACCOMPANYING FILES ARE SOLD "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OR MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED. Because of the various hardware and software environments into which Code Metric may be put, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.

Good data processing procedure dictates that any program be thoroughly tested with non-critical data before relying on it.  The user must assume the entire risk of using the program.  ANY LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE PRICE.


Credit card order form

To print this order form, select Print Topic from the File pull-down menu.

All orders are subject to the Code Metric License Agreement.  Prices guaranteed through August 2000.

Any questions about the status of the shipment of an order, refunds, registration options, product details, technical support, volume discounts, dealer pricing, site licenses, etc., should be directed to OSS Software. You can send Internet mail to help@codemetric.com; our goal is to respond to all e-mail inquiries within one business day. You can also send postal mail to OSS Software, 3276 S. White Rd., Box 192, San Jose, CA 95148.

Code Metric Single Copy	_____ at	$39 each =	__________

2 to 20 computers:	_____ at	$30 each =	__________

21 to 99 computers:	_____ at	$25 each =	__________

100 to 499 computers:	_____ at	$20 each =	__________

500 to 999 computers:	_____ at	$15 each =	__________

California Residents add 8.25% sales tax:	__________

Total payment:	__________

Date:	__________________________________________________

Credit Card:	[   ] MasterCard      [   ] VISA       [   ] AMEX        [   ] Discover

Credit Card #:	__________________________________________________

Expiration Date:	__________________________________________________

Name On Card:	__________________________________________________

Signature:	__________________________________________________

Name:	__________________________________________________

Company:	__________________________________________________

Billing Address:	__________________________________________________

City, State, Zip:	__________________________________________________

Country:	__________________________________________________

Day Phone:	__________________________________________________

E-Mail address:	__________________________________________________

How did you hear about Code Metric?	                                                                                                      __________________________________________________


Mail in order form
Order form

To print this order form, select Print Topic from the File pull-down menu.

To order by check, send this order form and a check to OSS Software, 3276 S. White Rd., Box 192, San Jose, CA 95148. Payments must be in US dollars drawn on a US bank, or you can send international postal money orders in US dollars.

All orders are subject to the Code Metric License Agreement.  Prices guaranteed through August 2000.

Customer information is considered confidential and will not be shared or distributed to any third party.

Code Metric Single Copy	_____ at	$39 each =	__________

2 to 20 computers:	_____ at	$30 each =	__________

21 to 99 computers:	_____ at	$25 each =	__________

100 to 499 computers:	_____ at	$20 each =	__________

500 to 999 computers:	_____ at	$15 each =	__________

California Residents add 8.25% sales tax:	__________

Total payment:	__________

Date:	_______________________________________________________

Name:	_______________________________________________________

Company:	_______________________________________________________

Shipping Address:	_______________________________________________________

_______________________________________________________

City, State, Zip:	_______________________________________________________

Country:	_______________________________________________________

Day Phone:	_______________________________________________________

E-mail address:	_______________________________________________________

How did you hear about Code Metric?

_______________________________________________________

Comments:


Evaluation license

See the section titled Copyright/License/Warranty for the full license agreement.

Evaluation and registration

This is not free software.  Subject to the terms below, you are hereby licensed to use this software for evaluation purposes without charge for a period of 30 days.  If you use this software after the 30 day evaluation period a registration fee of $19 is required.  Payments must be in US dollars drawn on a US bank, and should be sent to OSS Software, 3276 S. White Rd., Box 192, San Jose, CA 95148.  Credit card ordering and quantity discounts are available, as described in the section Ordering Information/Order Form.  When payment is received you will be sent a registered copy of the latest version of Code Metric.

Unregistered use of Code Metric after the 30-day evaluation period is in violation of U.S. and international copyright laws.

Distribution

Provided that you verify that you are distributing the evaluation version (select About from the Code Metric Help menu to check) you are hereby licensed to make as many copies of the evaluation version of this software and documentation as you wish; give exact copies of the original evaluation version to anyone; and distribute the evaluation version of the software and documentation in its unmodified form via electronic means.  There is no charge for any of the above.

You are specifically prohibited from charging, or requesting donations, for any such copies, however made; and from distributing the software and/or documentation with other products (commercial or otherwise) without prior written permission.


Anomalies
 Formatting anomalies

There are a few cases where unusual code can cause Code Metric to not properly indent code.  One of the most common is multi-line matrix initialization statements.  Lines after the first typically receive an extra indent.

int iIntArray[30] =

{

    1,2,3,4,5,6,7,8,9,10,

        11,12,13,14,15,16,17,18,19,20,      improper extra indent

        21,22,23,24,25,26,27,28,29,30

}

Another problem is leading operators after MACROS or other lines without ‘;’ termination.  These lines also receive an extra indent.

    // The following causes a problem

    ASSERT( a=b )

        ++a;        The ++ operator confuses the indenting engine

The if-then-else indenting engine can be fooled if you have multiple indent levels without braces.  This is generally a bad programming practice, as it’s very difficult to follow the program flow even when properly indented.  Placing braces for complex statements of this type is the “right thing to do”, and will correct the indenting.

If you find other anomalies please let us know, we are working on making Code Metric as perfect and reliable as possible.


No help available

No help is available for this area of the window.


No help available

No help is available for this message box.


File Print command
Print command (File menu)

Use this command to print a document.   This command presents a Print dialog box, where you may specify the range of pages to be printed, the number of copies, the destination printer, and other printer setup options.

Shortcuts

Toolbar:

Keys:	CTRL+P


Print dialog box

The following options allow you to specify how the document should be printed:

Printer

This is the active printer and printer connection.  Choose the Setup option to change the printer and printer connection.

Setup

Displays a Print Setup dialog box, so  you can select a printer and printer connection.

Print Range

Specify the pages you want to print:

All	Prints the entire document.
Pages	Prints the range of pages you specify in the From and To boxes.
Copies

Specify the number of copies you want to print for the above page range.

Collate Copies

Prints copies in page number order, instead of separated multiple copies of each page.

Print Quality

Select the quality of the printing.  Generally, lower quality printing takes less time to produce.


Print dialog
Print Progress Dialog

The Printing dialog box is shown during the time that Code Metric is sending output to the printer.  The page number indicates the progress of the printing.

To abort printing, choose Cancel.


File Print Preview command
Print Preview command (File menu)

Use this command to display the active document as it would appear when printed.  When you choose this command, the main window will be replaced with a print preview window in which one or two pages will be displayed in their printed format.  The print preview toolbar offers you options to view either one or two pages at a time; move back and forth through the document; zoom in and out of pages; and initiate a print job.


Print Preview toolbar

The print preview toolbar offers you the following options:

Print

Bring up the print dialog box, to start a print job.

Next Page

Preview the next printed page.

Prev Page

Preview the previous printed page.

One Page / Two Page

Preview one or two printed pages at a time.

Zoom In

Take a closer look at the printed page.

Zoom Out

Take a larger look at the printed page.

Close

Return from print preview to the editing window.


File Print Setup command
Print Setup command (File menu)

Use this command to select a printer and a printer connection.  This command presents a Print Setup dialog box, where you specify the printer and its connection.


Print setup dialog
Print Setup dialog box

The following options allow you to select the destination printer and its connection.

Printer

Select the printer you want to use.  Choose the Default Printer; or choose the Specific Printer option and select one of the current installed printers shown in the box.  You install printers and configure ports using the Windows Control Panel.

Orientation

Choose Portrait or Landscape.

Paper Size

Select the size of paper that the document is to be printed on.

Paper Source

Some printers offer multiple trays for different paper sources.  Specify the tray here.

Options

Displays a dialog box where you can make additional choices about printing, specific to the type of printer you have selected.

Network...

Choose this button to connect to a network location, assigning it a new drive letter.