"M" Coding Conventions
[This is prerelease documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The topics in this section describe coding conventions, idioms, patterns, and other best practices for modeling in the Microsoft code name “M” modeling language.

The guidelines are organized as simple recommendations that use the words “Do”, “Consider”, “Avoid”, and “Do not.” These words indicate the strength of the recommendation as shown in the following table.

Recommendation typeDescription

“Do”

A guideline that you should always follow.

“Consider”

A guideline that you should generally follow. Exceptions are acceptable when you understand the original guideline and have a reason not to follow it.

“Avoid”

A practice that you should generally avoid. There might be scenarios where the practice makes sense.

“Do not”

A practice that you should always avoid.

Dd129638.note(en-us,VS.85).gifNote:
Note that even with the “Do” and “Do not” guidelines, there might be justifiable scenarios for breaking these rules. However, these scenarios are extremely rare, and you should carefully consider the consequences and possible alternatives.

In This Section

Directory Structure
Provides recommendations for setting up directories in “M”.

Source File Names
Provides naming conventions for “M” source files.

Source File Content
Provides general guidelines for organizing the content of an “M” source file.

Indentation and Line Width
Provides recommendations for indentations and line widths for “M” code.

Braces
Provides recommendations for using braces in “M” code.

Spacing and Alignment
Provides recommendations for spacing and alignment in “M” code.

Comments
Provides recommendations for adding comments to “M” source files.

Naming
Provides naming conventions for “M” code.

Extents and Types
Provides best practices for using extents and types in “M” code.

Reference

Related Sections

Tags :


Page view tracker