Project NameCheck standard configuration: Special

Project NameCheck configuration

Special

The Special tab contains some of the most complex settings of Project NameCheck.

Project NameCheck special configuration

Array
Special modifier for array variable names, see below.
Constant
Type prefix/suffix for constants. Data type settings are not enforced for constants, even if a data type is declared for a constant. This setting is used instead of the normal Type setting for Integer, Long, String or any other type of constant.
Control pointer
Special modifier for control pointers. See below.
Enum
Type prefix/suffix for Enum names. (Enum enumname ... End Enum).
Note: Scope prefix/suffix for Enum constants (defined inside the Enum...End Enum block) is set on the Scope page. Data type standards are not enforced for enum constants.
Type
Type prefix/suffix for the name of a Type definition (Type typename ... End Type) in VB 3-6.
Note: Scope prefix/suffix for type fields is set on the Scope page. Type related settings don't affect Structures in VB.NET. This setting has no equivalent setting in VB.NET.

Arrays

If you want to use a special prefix or suffix for array variables, this is where you set it. If you don't wish to use anything special for arrays, then just clear the array prefix/suffix.

Arrays with type prefix or suffix

The array prefix/suffix is relative to other type prefixes/suffixes. Let's imagine you use "a" as the array prefix or suffix. Here are your options for an array of Integers (array of ages).

Array prefix or suffix used with type prefix or suffix
ScenarioSettingsExample 1
Prefix/suffix "int"
Example 2
Suffix "%"
Array prefix "a" with type prefix a + type + base aintAGE()
Array prefix "a" with type suffix base + a + type AGEaint() AGEa%()
Array suffix "a" with type prefix type + a + base intaAGE()
Array suffix "a" with type suffix base + type + a AGEinta() AGE%()
no array suffix possible here

Arrays without type prefix/suffix

You can tell Project NameCheck to ignore the type of arrays by checking the "Ignore type of arrays" on the Misc page. This option makes Project NameCheck forget about the variable type, but require the array prefix/suffix set on the Special page.

Whether you check this option or not, there is also a special case where this behavior is automatic: you have an array but you haven't set a type suffix or prefix for it. Either you don't know the type, or it's a rare type like array of CoolWidgets.

Array prefix or suffix, no type prefix or suffix
ScenarioStructureExample
Array prefix "a" with no type a + base aAGE()
base + a AGEa()
Array suffix "a" with no type a + base aAGE()
base + a AGEa()

Control pointers

Control pointers are object variables that contain a reference to a control. You might want to distinguish the references from the real controls. This is where you use the control pointer modifier. This functionality is available only for VB 3-6.

The prefix/suffix for control pointers behaves just like the array prefix/suffix. It is added before or after the type prefix/suffix.

Note: Forms, classes and other objects are not controls. The control pointer modifier only works with control types that exist on the Controls page.

Array of control pointers

If you have an array of control pointers (array of TextBoxes, for example) and you use both an array and a control modifier, then you have one of the most complex names at hand. The array modifier is always outside the control pointer modifier. Thus, array prefix "a" and control pointer prefix "o" together become "ao + type". Array suffix "a" and control pointer suffix "o" become "type + oa". Complicated? Yes, but fortunately rare. And you don't have to use either if you don't feel like it.

Project NameCheck configuration

© Project Analyzer Help