Project NameCheck configuration
The Special tab contains some of the most complex settings of Project NameCheck.
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.
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).
Scenario | Settings | Example 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 |
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.
Scenario | Structure | Example |
---|---|---|
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 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.
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.