An inline declaration is performed using a declaration operator in a declaration expression and is made in a declaration position. The result of the declaration is used in the current operand position, is visible statically from the current position, and is valid in the current context.
7.31 | 7.40 | 7.54
Inline declarations are intended to make programs leaner and easier to understand. The following rules must also be observed:
- The rule that dictates no global variables and field symbols means that inline declarations should only be used in processing blocks that support local data.
- Inline declarations are an exception to the rule that local declarations should only be made at the start of a procedure. For this reason, they should only be used in easily manageable procedures, to make them easier to understand.