Comparison with C and C++ Script Classes

Naming Conventions


For naming things in scripts, Mira Pro Script uses the following convention:

     Except for special cases, the first letter of each word is uppercase.

This means that a name made from a single word has a capital first letter. Similarly, a name representing multiple words merges the words and uses an uppercase first letter for each word. Here are some examples: Value, MyValue, and MyValueName.

In naming classes, the convention used in Mira Pro Script is to begin each class name with a capital letter, as is common in the C language. Examples of standard class names are CTextView, CImage, and CMatrix.

In classes, the new and delete methods are special cases that do not follow the convention of a capitalized first letter. To be sure their use and importance is recognized by C++ programmers, the names of the new and delete methods are always in lowercase, as is typically done in the C and C++ languages. The special purpose of these methods parallels their use in C++; Do not forget to begin and and the life of a class instance by calling the new and delete members of the class.

You do not have to use any of these conventions, but the standard classes provided with the Mira Pro Script module follow these rules.

Related Topics

Creating Classes, Script Classes, Comparison with C and C++