ARM_scoping

Controls the scope of variables declared in the expression parts of if, while, and for statements.

Syntax

#pragma ARM_scoping on | off | reset

Targets
All platforms.
Remarks

If you enable this pragma, any variable you declare in any of the above conditional expressions remains valid until the end of the block that contains the statement. Otherwise, the variables only remains valid until the end of that statement. Listing 10.5 shows an example.

Listing 10.5 Example of Using Variables Declared in for Statement

for( int i=1; i<1000; i++) {
/* . . . */ }
return i; // OK if ARM_conform is enabled.

This pragma does not correspond to any panel setting. To check this setting, use __option (ARM_scoping. They default setting is off.