|
1 | 1 | <h2>Why is this an issue?</h2>
|
2 | 2 | <p>
|
3 | 3 | Code that follows a consistent naming convention is self-documenting. In Delphi, all pointer names
|
4 |
| - should be named identically to the dereferenced type, with the type prefix swapped for <code>P</code>. |
| 4 | + should be named identically to the dereferenced type, with the type prefix swapped for |
| 5 | + <code>P</code>. |
5 | 6 | </p>
|
6 | 7 | <p>
|
7 |
| - For example, the pointer types for <code>TMyType</code>, |
8 |
| - <code>EMyType</code>, and <code>IMyType</code> should be named <code>PMyType</code>. |
| 8 | + For example, the pointer types for <code>TMyType</code>, <code>EMyType</code>, and |
| 9 | + <code>IMyType</code> should be named <code>PMyType</code>. |
9 | 10 | </p>
|
10 | 11 | <p>
|
11 |
| - Custom prefixes for dereferenced types are also supported, |
12 |
| - provided they also start with <code>T</code>, <code>E</code> or <code>I</code>. |
| 12 | + Custom prefixes for dereferenced types are also supported, provided they also start with |
| 13 | + <code>T</code>, <code>E</code> or <code>I</code>. |
13 | 14 | </p>
|
14 | 15 | <p>
|
15 |
| - For example, the pointer types for <code>TxyMyType</code>, |
16 |
| - <code>ExyMyType</code>, and <code>IxyMyType</code> should be named <code>PxyMyType</code>. |
| 16 | + For example, the pointer types for <code>TxyMyType</code>, <code>ExyMyType</code>, and |
| 17 | + <code>IxyMyType</code> should be named <code>PxyMyType</code>. |
17 | 18 | </p>
|
18 | 19 | <p>
|
19 |
| - If dereferenced type is in PascalCase but does not have a valid prefix, |
20 |
| - the pointer name is expected to be the same as the type name but with the addition of the prefix <code>P</code>. |
| 20 | + If the dereferenced type is in PascalCase but does not have a valid prefix, the pointer name is |
| 21 | + expected to be the same as the type name but with the addition of the prefix <code>P</code>. |
21 | 22 | </p>
|
22 | 23 | <p>For example:</p>
|
23 | 24 | <ul>
|
24 | 25 | <li><code>^MyObject</code> should be named <code>PMyObject</code></li>
|
25 | 26 | <li><code>^MyType</code> should be named <code>PMyType</code></li>
|
26 | 27 | </ul>
|
27 | 28 | <p>
|
28 |
| - Note that pointers to types that do not follow the naming standard are valid |
29 |
| - as long as they are in PascalCase with the prefix <code>P</code>. |
| 29 | + Note that pointers to types that do not follow the naming standard are valid as long as they are |
| 30 | + in PascalCase with the prefix <code>P</code>. |
30 | 31 | </p>
|
31 | 32 | <p>For example:</p>
|
32 | 33 | <ul>
|
|
0 commit comments